myarr=new Array();
myarr['四川省']=['成都市','泸州市','宜宾市','眉山市','绵阳市'];
myarr['云南省']=['昆明市','昭通市','曲靖市','玉溪市','丽江市'];
function addPro(){
var pro=document.getElementById('pro');
for(key in myarr){
pro.add(new Option(key,key));
}
}
function loadcity(){
var pro=document.getElementById('pro');
var index=pro.selectedIndex;
var val=pro[index].value;
var city=document.getElementById('city');
city.options.length=0;
for(key in myarr[val]){
city.add(new Option(myarr[val][key],myarr[val][key]));
}
}