标签:
json ={ GW:[{id:"655",mc:"董事"},{id:"656",mc:"书记"},{id:"804",mc:"经理"},{id:"818",mc:"财务总监"},{id:"820",mc:"助理"}], GZ:[{id:"1",mc:"电工"},{id:"2",mc:"钳工"},{id:"3",mc:"仓管"}]}
var array = eval("(" + json + ")");
for (var i = 0; i < array .GW.length; i++) {
$(ddl_control1).append("<option value=‘" + array.GW[i].id + "‘>" + array.GW[i].mc + "</option>");
}
for (var i = 0; i < array .GZ.length; i++) {
$(ddl_control2).append("<option value=‘" + bb.GZ[i].id + "‘>" + array.GZ[i].mc + "</option>");
}
标签:
原文地址:http://www.cnblogs.com/yzl495/p/4248072.html