这不起作用,但我不知道如何纠正它:
for(i=1; i<=3; i++){
var address_con+[i] = document.getElementById("address_con[i]")
var CAP_con+[i] = document.getElementById("CAP_con[i]")
var city_con+[i] = document.getElementById("city_con[i]")
}
它应该产生:
//FIRST ELEMENT
address_con1 = document.getElementById("address_con1")
etc.
//LAST ELEMENT
city_con3 = document.getElementById("city_con3")
错误是:
var name+[i]
谢谢