作者:骑蜗牛追神81986 | 来源:互联网 | 2023-05-26 15:12
functionfillSelect(json){while(document.getElementById(parentId).options.length!
function fillSelect(json){
while(document.getElementById("parentId").options.length!=1){
document.getElementById("parentId").options.remove(1);
}
var obj = JSON.parse(json);
$.each(obj.data,function(n,value){
var selectObj=document.getElementById("parentId");
selectObj.options[selectObj.length] = new Option(value.title, value.id);
});
}