$ ('# SelectTypeOne'). combobox ({ Url: config. urlMap. typeList, ValueField: 'name ', TextField: 'name ', Required: true, Width: '200 ', OnSelect: function (row ){ TypeName1 = row. name Certificate ('{typethree'{.html (""); Certificate ('{typeoneresult'{.html (""); Certificate ('{typeonesubresult'{.html (""); SubTypeName = []; $ ('# SelectTypeTwo'). combobox ({ Url: config. urlMap. typeList + "? Parent = "+ row. id, ValueField: 'name ', TextField: 'name ', Width: '200 ', Required: true, OnSelect: function (row ){ TypeName2 = typeName1 + ">" + row. name; $. GetJSON (config. urlMap. typeList + "? Parent = "+ 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 } Certificate ('{typethree'}.html (typeThreeName ); ('{Typeoneresult'{.html (typeName2 + "> "); Certificate ('{typeonesubresult'{.html (""); SubTypeName = []; }); } }) } }); }) // Delete subscript Element Method 1 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 } // Method 2 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 ); } ('Your typeonesubresult'{.html (subTypeName. join (",")); } |