请问全国三级联动菜单在PHP后台怎么关联数据库?

2025-01-19 14:19:15
推荐回答(2个)
回答1:

更改setup()为:

function setup()
{
for(i=0;i document.getElementById(s[i]).onchange=new Function("change("+(i+1)+")");
change(0);
//################
setDefault("四川","达州","达县");
function setDefault(province,city,town){
var select=document.getElementById("s1");
for(x=0;x var child=select.children[x];
if(child.value===province){
child.selected=true;
}
}
change(1);
select=document.getElementById("s2");
for(x=0;x var child=select.children[x];
if(child.value===city){
child.selected=true;
}
}
change(2);
select=document.getElementById("s2");
for(x=0;x var child=select.children[x];
if(child.value===town){
child.selected=true;
}
}
}
}

回答2:

php+mysql+jquery实现比较简单,时间问题不能给你写代码了,你百度一下就可以找到