论坛首页 Web前端技术论坛

struts2 easyui combobox

浏览 3004 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2014-05-27  

今天花了半天才搞定。

网上找了不少例子。最后搞定了。

 

<input id="wifis_barId_index" class="easyui-combobox"  />

 

/**下拉框初始化*/

from_initUserCombox();

function from_initUserCombox() {

$.ajax({  

url:"barapp/Bars/getComboBox.do",

 cache: false,  

 dataType:"json",  

 success: function(result){

 //alert("ok"+result.list[0].id);

 var feiqumingxiarr = new Array();

 feiqumingxiarr =result.list;

   $("#wifis_barId_index").combobox({  

       data : feiqumingxiarr,  

       valueField : 'id',  

       textField : 'name' 

   });  

 },

 error : function(){

 alert("error");

 }

});

//$("#wifis_barId_index").combobox({

  //url:"barapp/Bars/getComboBox.do",

   //valueField:'id',

   //textField:''

//});

}

  • 大小: 11.9 KB
   发表时间:2014-06-05  
修改信息时,combobox的怎么默认选中?
0 请登录后投票
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics