<script src="js/jquery-1.11.1.js"></script>
<script>
$(function(){
var shengfen=[["洛阳","安阳"],["邯郸","石家庄"]];
$("#pro").change(function(){
$("#cityx").siblings().remove();
var sheng=$(this).val();
for (var i=0;i<shengfen[sheng].length;i++) {
var $o=$("<option></option>");
$o.html(shengfen[sheng][i]);
$("#city").append($o);
}
});
})
</script>
</head>
<body>
<select id="pro">
<option>--请选择--</option>
<option value="0">河南</option>
<option value="1">河北</option>
</select>
<select id="city">
<option id="cityx">--请选择--</option>
</select>
</body>
<script>
$(function(){
var shengfen=[["洛阳","安阳"],["邯郸","石家庄"]];
$("#pro").change(function(){
$("#cityx").siblings().remove();
var sheng=$(this).val();
for (var i=0;i<shengfen[sheng].length;i++) {
var $o=$("<option></option>");
$o.html(shengfen[sheng][i]);
$("#city").append($o);
}
});
})
</script>
</head>
<body>
<select id="pro">
<option>--请选择--</option>
<option value="0">河南</option>
<option value="1">河北</option>
</select>
<select id="city">
<option id="cityx">--请选择--</option>
</select>
</body>