function callBack() {
if(xhr.status == 200 || xhr.status == 304) {
if(xhr.readyState == 4) {
var data = JSON.parse(xhr.responseText)["城市代码"];
var index = 0;
for(var i = 0; i < data.length; i++) {
index = i;
s.innerHTML += ("<option>" + data[i]["省"] + "</option>")
s.onchange = function(i) {
console.log(i)
i = i.target
x.innerHTML += ("<option>" + "请选择" + "</option>")
if(s.value == i.value) {
i = i.value
console.log(i)
x.innerHTML += ("<option>" + + "</option>")
// for(var m = 0; m < data[j]["市"].length; m++) {
// x.innerHTML += ("<option>" + data[j]["市"][m]["市名"] + "</option>")
// console.log(data[j]["市"][m]["市名"])
// }
}
}
}
}
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…