欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

EasyUI實(shí)現(xiàn)下拉框多選功能

 更新時(shí)間:2017年11月07日 14:57:04   作者:Bright2017  
這篇文章主要為大家詳細(xì)介紹了EasyUI實(shí)現(xiàn)下拉框多選功能,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了EasyUI實(shí)現(xiàn)下拉框多選展示的具體代碼,供大家參考,具體內(nèi)容如下

效果圖:

這個(gè)沒什么說的,直接引入css和js文件和圖片,調(diào)用js即可。下面是源碼:

<html> 
 <head> 
  <meta charset="utf-8" /> 
  <title>利用EasyUI實(shí)現(xiàn)多選下拉框</title> 
  <link rel="stylesheet" type="text/css" href="css/easyui.css" rel="external nofollow" /> 
  <style type="text/css"> 
   ul{ 
    width: 200px !important; 
   } 
   li{ 
    width: 50px !important; 
    float: left !important; 
   } 
  </style> 
  <script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script> 
  <script src="js/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script> 
  <script type="text/javascript"> 
   $(function () { 
    $('#ddlLine').combotree({ 
     valueField: "id", //Value字段 
     textField: "text", //Text字段 
     multiple: true, 
     data: [{ "id": 1, "text": "All", "children": [{ "id": 13, "text": "C1" }, { "id": 14, "text": "C2" }, { "id": 15, "text": "C3"}]}], 
//     url: "tree_data2.json", //數(shù)據(jù)源 
     onCheck: function (node, checked) { 
      //讓全選不顯示 
      $("#ddlLine").combotree("setText", $("#ddlLine").combobox("getText").toString().replace("全選,", "")); 
     }, 
     onClick: function (node, checked) { 
      //讓全選不顯示 
      $("#ddlLine").combotree("setText", $("#ddlLine").combobox("getText").toString().replace("全選,", "")); 
     } 
    }); 
   }) 
  </script> 
</head> 
<body> 
 多選:<select id="ddlLine" class="easyui-combotree" style="width: 205px; height: 24px;"> 
 </select> 
</body> 
</html> 

下載地址:EasyUI實(shí)現(xiàn)下拉框多選

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論