阅读背景:

js ajax 更改select option 只留第一个不限选项

来源:互联网 
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);
            });

        }function fillSelect(json){

            while(d



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: