1 功能预览
2html 代码
<span> <tr> <td> <img onclick = "addtype ()" src = "$ {msurl} /images/Logo/Add.png"> 产品范围 : : </td> <td> <select id = "selectType" Data-options = "Erforderlich: true"> </option> 一级分类 </option> 一级分类 </option> 一级分类 </option> Data-options = "Erforderlich: true"> <option selected id = "typesonesubresult"> </span> <hr/> </td> </tr> </span>3JS 代码
$ ('#selectTypeOne'). combobox ({url: config.urlmap.typelist, valueField: 'name', textfield: 'name', erforderlich: true, width: '100', onSelect: function (row) {typeName1 = row.name $ ('#typeTree'. $ ('#typeonesubresult'). html (""); + ">" + row.name; Daten [i] .NAME + "Typ = 'Kontrollkästchen'>" Daten [i] .Name} $ ('#TypeThe'). }); }) // 删除下标元素方式一 array.prototype.remove = function (dx) {if (isnan (dx) || dx> this.Length) {return false; } für (var i = 0, n = 0; i <this.Length; i ++) {if (this [i]! } this.splice (dx, 1); } var subtypename = []; Funktion clinkType (name) {var index = subtypame.indexof (name) if (index == -1) {subtypenname.push (name); } else {subtypename.baoremove (index); } $ ('#typesonesubresult'). }