⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 area.js

📁 一个练习JAVA的例子程序 一个练习JAVA的例子程序
💻 JS
📖 第 1 页 / 共 2 页
字号:
ProvinceInfo[20] = new provinceRecord("湖南", city21)
ProvinceInfo[13] = new provinceRecord("安徽", city22)
ProvinceInfo[12] = new provinceRecord("江苏", city23)
ProvinceInfo[18] = new provinceRecord("江西", city24)
ProvinceInfo[17] = new provinceRecord("浙江", city25)
ProvinceInfo[30] = new provinceRecord("福建", city26)
ProvinceInfo[21] = new provinceRecord("贵州", city27)
ProvinceInfo[28] = new provinceRecord("广西", city28)
ProvinceInfo[29] = new provinceRecord("广东", city29)
ProvinceInfo[23] = new provinceRecord("云南", city30)
ProvinceInfo[31] = new provinceRecord("海南", city31)
ProvinceInfo[32] = new provinceRecord("台湾", city32)
ProvinceInfo[33] = new provinceRecord("香港", city33)
ProvinceInfo[34] = new provinceRecord("澳门", city34)
ProvinceInfo[35] = new provinceRecord("美国", city35)
ProvinceInfo[36] = new provinceRecord("加拿大", city36)
ProvinceInfo[37] = new provinceRecord("澳大利亚", city37)
ProvinceInfo[38] = new provinceRecord("欧洲", city38)
ProvinceInfo[39] = new provinceRecord("其它", city39)

function showProvince(theProvince){
	theProvince.options.length=0
	for(i=0; i<ProvinceInfo.length; i++){
		theProvince.options[i]= new Option(ProvinceInfo[i].Desc,i)
	}
}

function selectProvince(theProvince, ProvinceIdx, theCity){
	if(ProvinceIdx=="") ProvinceIdx=0;
	if(ProvinceIdx>=0 && ProvinceIdx<=theProvince.options.length){
		theProvince.options[ProvinceIdx].selected=true
		showCity(ProvinceIdx, theCity)
	}
}

function showCity(ProvinceIdx, theCity){
	if(theCity=="") theCity=0;
	theCity.options.length=0;
	for(i=0; i<ProvinceInfo[ProvinceIdx].city.length; i++){
		//theCity.options[i]=new Option(ProvinceInfo[ProvinceIdx].city[i], i)
		theCity.options[i]=new Option(ProvinceInfo[ProvinceIdx].city[i],((ProvinceInfo[ProvinceIdx].city[i]=="请选择")?"":ProvinceInfo[ProvinceIdx].city[i]));
	}
}

function selectCity(theCity, CityIdx){
	if(CityIdx>=0 && CityIdx<=theCity.options.length)
		theCity.options[CityIdx].selected=true
}

function selectProvnAndCity(theProvince, ProvinceIdx, theCity, CityIdx){
	selectProvince(theProvince, ProvinceIdx, theCity)
	selectCity(theCity, CityIdx)
}

function writeProvince(theDocument, ProvinceIdx){
	if(ProvinceIdx>=0 && ProvinceIdx<=ProvinceInfo.length){
		theDocument.write(ProvinceInfo[ProvinceIdx].Desc);
	}
}

function writeCity(theDocument, ProvinceIdx, CityIdx){
	if(ProvinceIdx>=0 && ProvinceIdx<=ProvinceInfo.length){
		if(CityIdx>=0 && CityIdx<=ProvinceInfo[ProvinceIdx].city.length){
			theDocument.write(ProvinceInfo[ProvinceIdx].city[CityIdx]);
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -