<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<select id="sel1" οnchange="ff(this.value)">
<option>请选择省份</option>
</select>
<select id="sel2">
<option>请选择市</option>
</select>
</body>
var arr1=["河南省","河北省","江苏省","山东省"];
var arr2=[["商丘市","郑州市","洛阳市"],["邯郸市","保定市","廊坊市"],["南京市","苏州市","常州市","南通市","扬州市"],["曹县","泰安","曲阜"]];
οnlοad=function(){
aa=document.getElementById("sel1");
for(i=0;i<arr1.length;i++){
obj1=document.createElement("option");
obj1.innerHTML=arr1[i];
obj1.value=i;
aa.appendChild(obj1);
}
}
function ff(n){
bb=document.getElementById("sel2");
bb.length=0;
for(j=0;j<arr2[n].length;j++){
obj2=document.createElement("option");
obj2.innerHTML=arr2[n][j];
bb.appendChild(obj2);
}
}
</script>
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<select id="sel1" οnchange="ff(this.value)">
<option>请选择省份</option>
</select>
<select id="sel2">
<option>请选择市</option>
</select>
</body>
</html>
var arr1=["河南省","河北省","江苏省","山东省"];
var arr2=[["商丘市","郑州市","洛阳市"],["邯郸市","保定市","廊坊市"],["南京市","苏州市","常州市","南通市","扬州市"],["曹县","泰安","曲阜"]];
οnlοad=function(){
aa=document.getElementById("sel1");
for(i=0;i<arr1.length;i++){
obj1=document.createElement("option");
obj1.innerHTML=arr1[i];
obj1.value=i;
aa.appendChild(obj1);
}
}
function ff(n){
bb=document.getElementById("sel2");
bb.length=0;
for(j=0;j<arr2[n].length;j++){
obj2=document.createElement("option");
obj2.innerHTML=arr2[n][j];
bb.appendChild(obj2);
}
}
</script>