JS 가 실현 하 는 성 등급 연결 인 스 턴 스 코드
province.html:
<html>
<head>
<title> </title>
</head>
<script language="javascript" src="province.js" type="text/javascript" charset="gb2312"></script>
</script>
<body onload='getProvince()'>
<div id='province'><select><option> </option></select></div>
<div id='city'><select><option> </option></select></div>
</boydy>
</html>
province.js:
var sity;city=new Array(34);city[0]=new Array(19);
city[0][0]=" ";city[0][1]=" ";city[0][2]=" ";city[0][3]=" ";city[0][4]=" ";city[0][5]=" ";city[0][6]=" ";city[0][7]=" ";city[0][8]=" ";city[0][9]=" ";city[0][10]=" ";city[0][11]=" ";city[0][12]=" ";city[0][13]=" ";city[0][14]=" ";city[0][15]=" ";city[0][16]=" ";city[0][17]=" ";city[0][18]=" ";city[1]=new Array(12);city[1][0]=" ";city[1][1]=" ";city[1][2]=" ";city[1][3]=" ";city[1][4]=" ";city[1][5]=" ";city[1][6]=" ";city[1][7]=" ";city[1][8]=" ";city[1][9]=" ";city[1][10]=" ";city[1][11]=" ";city[2]=new Array(8);city[2][0]=" ";city[2][1]=" ";city[2][2]=" ";city[2][3]=" ";city[2][4]=" ";city[2][5]=" ";city[2][6]=" ";city[2][7]=" ";city[3]=new Array(1);city[3][0]=" ";city[4]=new Array(14);city[4][0]=" ";city[4][1]=" ";city[4][2]=" ";city[4][3]=" ";city[4][4]=" ";city[4][5]=" ";city[4][6]=" ";city[4][7]=" ";city[4][8]=" ";city[4][9]=" ";city[4][10]=" ";city[4][11]=" ";city[4][12]=" ";city[4][13]=" ";city[5]=new Array(12);city[5][0]=" ";city[5][1]=" ";city[5][2]=" ";city[5][3]=" ";city[5][4]=" ";city[5][5]=" ";city[5][6]=" ";city[5][7]=" ";city[5][8]=" ";city[5][9]=" ";city[5][10]=" ";city[5][11]=" ";city[6]=new Array(13);city[6][0]=" ";city[6][1]=" ";city[6][2]=" ";city[6][3]=" ";city[6][4]=" ";city[6][5]=" ";city[6][6]=" ";city[6][7]=" ";city[6][8]=" ";city[6][9]=" ";city[6][10]=" ";city[6][11]=" ";city[6][12]=" ";city[7]=new Array(9);city[7][0]=" ";city[7][1]=" ";city[7][2]=" ";city[7][3]=" ";city[7][4]=" ";city[7][5]=" ";city[7][6]=" ";city[7][7]=" ";city[7][8]=" ";city[8]=new Array(9);city[8][0]=" ";city[8][1]=" ";city[8][2]=" ";city[8][3]=" ";city[8][4]=" ";city[8][5]=" ";city[8][6]=" ";city[8][7]=" ";city[8][8]=" ";city[9]=new Array(12);city[9][0]=" ";city[9][1]=" ";city[9][2]=" ";city[9][3]=" ";city[9][4]=" ";city[9][5]=" ";city[9][6]=" ";city[9][7]=" ";city[9][8]=" ";city[9][9]=" ";city[9][10]=" ";city[9][11]=" ";city[10]=new Array(12);city[10][0]=" ";city[10][1]=" ";city[10][2]=" ";city[10][3]=" ";city[10][4]=" ";city[10][5]=" ";city[10][6]=" ";city[10][7]=" ";city[10][8]=" ";city[10][9]=" ";city[10][10]=" ";city[10][11]=" ";city[11]=new Array(14);city[11][0]=" ";city[11][1]=" ";city[11][2]=" ";city[11][3]=" ";city[11][4]=" ";city[11][5]=" ";city[11][6]=" ";city[11][7]=" ";city[11][8]=" ";city[11][9]=" ";city[11][10]=" ";city[11][11]=" ";city[11][12]=" ";city[11][13]=" ";city[12]=new Array(12);city[12][0]=" ";city[12][1]=" ";city[12][2]=" ";city[12][3]=" ";city[12][4]=" ";city[12][5]=" ";city[12][6]=" ";city[12][7]=" ";city[12][8]=" ";city[12][9]=" ";city[12][10]=" ";city[12][11]=" ";city[13]=new Array(11);city[13][0]=" ";city[13][1]=" ";city[13][2]=" ";city[13][3]=" ";city[13][4]=" ";city[13][5]=" ";city[13][6]=" ";city[13][7]=" ";city[13][8]=" ";city[13][9]=" ";city[13][10]=" ";city[14]=new Array(10);city[14][0]=" ";city[14][1]=" ";city[14][2]=" ";city[14][3]=" ";city[14][4]=" ";city[14][5]=" ";city[14][6]=" ";city[14][7]=" ";city[14][8]=" ";city[14][9]=" ";city[15]=new Array(14);city[15][0]=" ";city[15][1]=" ";city[15][2]=" ";city[15][3]=" ";city[15][4]=" ";city[15][5]=" ";city[15][6]=" ";city[15][7]=" ";city[15][8]=" ";city[15][9]=" ";city[15][10]=" ";city[15][11]=" ";city[15][12]=" ";city[15][13]=" ";city[16]=new Array(10);city[16][0]=" ";city[16][1]=" ";city[16][2]=" ";city[16][3]=" ";city[16][4]=" ";city[16][5]=" ";city[16][6]=" ";city[16][7]=" ";city[16][8]=" ";city[16][9]=" ";city[17]=new Array(15);city[17][0]=" ";city[17][1]=" ";city[17][2]=" ";city[17][3]=" ";city[17][4]=" ";city[17][5]=" ";city[17][6]=" ";city[17][7]=" ";city[17][8]=" ";city[17][9]=" ";city[17][10]=" ";city[17][11]=" ";city[17][12]=" ";city[17][13]=" ";city[17][14]=" ";city[18]=new Array(12);city[18][0]=" ";city[18][1]=" ";city[18][2]=" ";city[18][3]=" ";city[18][4]=" ";city[18][5]=" ";city[18][6]=" ";city[18][7]=" ";city[18][8]=" ";city[18][9]=" ";city[18][10]=" ";city[18][11]=" ";city[19]=new Array(9);city[19][0]=" ";city[19][1]=" ";city[19][2]=" ";city[19][3]=" ";city[19][4]=" ";city[19][5]=" ";city[19][6]=" ";city[19][7]=" ";city[19][8]=" ";city[20]=new Array(8);city[20][0]=" ";city[20][1]=" ";city[20][2]=" ";city[20][3]=" ";city[20][4]=" ";city[20][5]=" ";city[20][6]=" ";city[20][7]=" ";city[21]=new Array(16);city[21][0]=" ";city[21][1]=" ";city[21][2]=" ";city[21][3]=" ";city[21][4]=" ";city[21][5]=" ";city[21][6]=" ";city[21][7]=" ";city[21][8]=" ";city[21][9]=" ";city[21][10]=" ";city[21][11]=" ";city[21][12]=" ";city[21][13]=" ";city[21][14]=" ";city[21][15]=" ";city[22]=new Array(13);city[22][0]=" ";city[22][1]=" ";city[22][2]=" ";city[22][3]=" ";city[22][4]=" ";city[22][5]=" ";city[22][6]=" ";city[22][7]=" ";city[22][8]=" ";city[22][9]=" ";city[22][10]=" ";city[22][11]=" ";city[22][12]=" ";city[23]=new Array(11);city[23][0]=" ";city[23][1]=" ";city[23][2]=" ";city[23][3]=" ";city[23][4]=" ";city[23][5]=" ";city[23][6]=" ";city[23][7]=" ";city[23][8]=" ";city[23][9]=" ";city[23][10]=" ";city[24]=new Array(13);city[24][0]=" ";city[24][1]=" ";city[24][2]=" ";city[24][3]=" ";city[24][4]=" ";city[24][5]=" ";city[24][6]=" ";city[24][7]=" ";city[24][8]=" ";city[24][9]=" ";city[24][10]=" ";city[24][11]=" ";city[24][12]=" ";city[25]=new Array(5);city[25][0]=" ";city[25][1]=" ";city[25][2]=" ";city[25][3]=" ";city[25][4]=" ";city[26]=new Array(7);city[26][0]=" ";city[26][1]=" ";city[26][2]=" ";city[26][3]=" ";city[26][4]=" ";city[26][5]=" ";city[26][6]=" ";city[27]=new Array(11);city[27][0]=" ";city[27][1]=" ";city[27][2]=" ";city[27][3]=" ";city[27][4]=" ";city[27][5]=" ";city[27][6]=" ";city[27][7]=" ";city[27][8]=" ";city[27][9]=" ";city[27][10]=" ";city[28]=new Array(8);city[28][0]=" ";city[28][1]=" ";city[28][2]=" ";city[28][3]=" ";city[28][4]=" ";city[28][5]=" ";city[28][6]=" ";city[28][7]=" ";city[29]=new Array(4);city[29][0]=" ";city[29][1]=" ";city[29][2]=" ";city[29][3]=" ";city[30]=new Array(12);city[30][0]=" ";city[30][1]=" ";city[30][2]=" ";city[30][3]=" ";city[30][4]=" ";city[30][5]=" ";city[30][6]=" ";city[30][7]=" ";city[30][8]=" ";city[30][9]=" ";city[30][10]=" ";city[30][11]=" ";city[31]=new Array(17);city[31][0]=" ";city[31][1]=" ";city[31][2]=" ";city[31][3]=" ";city[31][4]=" ";city[31][5]=" ";city[31][6]=" ";city[31][7]=" ";city[31][8]=" ";city[31][9]=" ";city[31][10]=" ";city[31][11]=" ";city[31][12]=" ";city[31][13]=" ";city[31][14]=" ";city[31][15]=" ";city[31][16]=" ";city[32]=new Array(1);city[32][0]=" ";city[33]=new Array(1);city[33][0]=" ";
function getRegion()
{
document.getElementById("city").innerHTML="";
var provinces=document.getElementById("provinces");
var prov=provinces[provinces.selectedIndex].value;
var str="<select>";
for(var i=0;i<city[prov].length;i++)
{
str=str+"<option>"+city[prov][i]+"</option>";
}
str=str+"</select>";
document.getElementById("city").innerHTML=str;
}
function getProvince()
{ var strs="<select onchange='getRegion()' id='provinces'><option></option>";
for(var i=0;i<=33;i++)
{
strs=strs+"<option value="+i+">"+city[i][0]+"</option>";
}
strs=strs+"</select>";
document.getElementById('province').innerHTML=strs;
}
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
JS 판단 수조 네 가지 실현 방법 상세그러면 본고는 주로 몇 가지 판단 방식과 방식 판단의 원리를 바탕으로 문제가 있는지 토론하고자 한다. 예를 들어 html에 여러 개의 iframe 대상이 있으면 instanceof의 검증 결과가 기대에 부합되지 않을...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.