更改setup()为:
function setup()
{
for(i=0;i
change(0);
//################
setDefault("四川","达州","达县");
function setDefault(province,city,town){
var select=document.getElementById("s1");
for(x=0;x
if(child.value===province){
child.selected=true;
}
}
change(1);
select=document.getElementById("s2");
for(x=0;x
if(child.value===city){
child.selected=true;
}
}
change(2);
select=document.getElementById("s2");
for(x=0;x
if(child.value===town){
child.selected=true;
}
}
}
}
php+mysql+jquery实现比较简单,时间问题不能给你写代码了,你百度一下就可以找到