<span> <tr> <td><img onclick="addType()" src="/UploadFiles/2021-04-02/add.png">3js代码
$('#selectTypeOne').combobox({ url : config.urlMap.typeList, valueField : 'name', textField : 'name', required : true, width : '100', onSelect : function(row) { typeName1 = row.name $('#typeThree').html(""); $('#typeOneResult').html(""); $('#typeOneSubResult').html(""); subTypeName=[]; $('#selectTypeTwo').combobox({ url : config.urlMap.typeList + "" + row.id, valueField : 'name', textField : 'name', width : '100', required : true, onSelect : function(row) { typeName2 = typeName1 + ">" + row.name; $.getJSON(config.urlMap.typeList + "" + row.id, function(data) { var typeThreeName = "" for (var i = 0; i < data.length; i++) { typeThreeName += "<input onclick=clinkType(\"" + data[i].name + "\") name='typeThree' value=" + data[i].name + " type='checkbox'>" + data[i].name } $('#typeThree').html(typeThreeName); $('#typeOneResult').html(typeName2 + ">"); $('#typeOneSubResult').html(""); subTypeName=[]; }); } }) } }); }) //删除下标元素方式一 Array.prototype.remove = function(dx) { if (isNaN(dx) || dx > this.length) { return false; } for (var i = 0, n = 0; i < this.length; i++) { if (this[i] != this[dx]) { this[n++] = this[i] } } this.length -= 1 } //删除数组元素方式二 Array.prototype.baoremove = function(dx) { if (isNaN(dx) || dx > this.length) { return false; } this.splice(dx, 1); } var subTypeName = []; function clinkType(name) { var index = subTypeName.indexOf(name) if (index == -1) { subTypeName.push(name); } else { subTypeName.baoremove(index); } $('#typeOneSubResult').html(subTypeName.join(",")); }
最新资源
- 群星.2024-繁花电视剧原声带3CD【环球】【WAV+C
- 江希文.1994-伝说少女(饿狼伝说动画原声大碟)【
- 洪荣宏.2010-上爱的人【华特】【WAV+CUE】
- 《大牌国语情歌 经典再现 深情对唱 2CD》[WAV/分
- 《陈百强粉红色的一生精选 3CD》[FLAC/分轨][1.
- 《丁当 20首重量级歌曲 Fu Good 下一站天后 2CD
- 歌莉雅.2012-My.Voice.Story【环星】【FLAC分轨
- 群星.1993-一曲成名·青春无悔【飞碟】【WAV+CUE
- 刘德华.2000-爱无知(金装版)【NEWMELODY】【WAV
- 许巍《时光漫步》1CD[FLAC/分轨][804.3MB]