jQuery MiniUI

 找回密码
 立即注册
查看: 3772|回复: 1
打印 上一主题 下一主题

返回JSON 如何绑定MINI COMBOBOX [复制链接]

Rank: 1

跳转到指定楼层
楼主
发表于 2012-7-24 11:55:26 |显示全部楼层 |倒序浏览
  <script type="text/javascript">
          $(document).ready(function() {
              $.ajax({
                  type: "post",
                  url: "GetDataHandler.ashx",
                  async: false,
                  cache: false,
                  datatype: "json",
                  success: function(data) {
                  $.getJSON("GetDataHandler.ashx", { param: "D_Zh" }, function(data) {
                  $('#combo1').load(data);
                          $.each(data, function(Key, item) {
                              alert(item.D_Zh);
                          });
                      });
                  }
              });
            
          });
      </script>
<input id="combo1" class="mini-combobox" style="width:150px;" textField="text" valueField=""
    value="" showNullItem="true" required="true" allowInput="true"/>

Rank: 1

沙发
发表于 2012-7-24 11:59:44 |显示全部楼层
我知道有种办法是遍历网页元素 然后再将这些数据拼进去 想问有没有提供一些方法可以直接绑定的

Archiver|普加软件

GMT+8, 2024-5-19 13:10 , Processed in 1.069540 second(s), 11 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部