自己设计的javascript 行政区划表示法

<script> //区县地区 var x1=new Array(15); x1[0]=new Array(' ','','',''); var x2=new Array(13); x2[0]=new Array(' ','','',''); var x3=new Array(9); x3[0]=new Array(' ','','',''); var x4=new Array(6); x4[0]=new Array(' ','','',''); var x5=new Array(10); x5[0]=new Array(' ','','',''); var x6=new Array(8); x6[0]=new Array(' ','','',''); var x7=new Array(10); x7[0]=new Array(' ','','',''); var x8=new Array(12); x8[0]=new Array(' ','','',''); var x9=new Array(9); x9[0]=new Array(' ','','',''); var x10=new Array(11); x10[0]=new Array(' ','','',''); var x11=new Array(8); x11[0]=new Array(' ','','',''); var x12=new Array(11); x12[0]=new Array(' ','','',''); var x13=new Array(7); x13[0]=new Array(' ','','',''); var x14=new Array(9); x14[0]=new Array(' ','','',''); var x15=new Array(7); x15[0]=new Array(' ','','',''); var x16=new Array(11); x16[0]=new Array(' ','','',''); var x17=new Array(2); x17[0]=new Array(' ','','',''); var x18=new Array(2); x18[0]=new Array(' ','','',''); var x19=new Array(6); x19[0]=new Array(' ','','',''); var x20=new Array(8); x20[0]=new Array(' ','','',''); var x21=new Array(8); x21[0]=new Array(' ','','',''); //城市地区 var d=new Array(23); d[0]=new Array(' ','','','') d[1]=new Array(' ','','广州市','
',x1); d[2]=new Array(' ','','韶关市','
',x2); d[3]=new Array(' ','','深圳市','
',x3); d[4]=new Array(' ','','珠海市','
',x4); d[5]=new Array(' ','','汕头市','
',x5); d[6]=new Array(' ','','佛山市','
',x6); d[7]=new Array(' ','','江门市','
',x7); d[8]=new Array(' ','','湛江市','
',x8); d[9]=new Array(' ','','茂名市','
',x9); d[10]=new Array(' ','','肇庆市','
',x10); d[11]=new Array(' ','','惠州市','
',x11); d[12]=new Array(' ','','梅州市','
',x12); d[13]=new Array(' ','','汕尾市','
',x13); d[14]=new Array(' ','','河源市','
',x14); d[15]=new Array(' ','','阳江市','
',x15); d[16]=new Array(' ','','清远市','
',x16); d[17]=new Array(' ','','东莞市','
',x17); d[18]=new Array(' ','','中山市','
',x18); d[19]=new Array(' ','','潮州市','
',x19); d[20]=new Array(' ','','揭阳市','
',x20); d[21]=new Array(' ','','云浮市','
',x21); d[22]=new Array('
','','',''); //省地区 var s=new Array('',' ',' 广东省','
',d); //选区划 function sellocal(types,qhdm){ if(types=="d"){ //替换逗号 var temp=d[qhdm].toString().replace(/,/g,' '); } else if(types=="x"){ //替换逗号 var temp=x[qhdm].toString().replace(/,/g,' '); } else{ var temp=s.toString().replace(/,/g,' '); } //document.write(temp); xzqh.innerHTML=temp; } function checkall(spanvar){ var obj=event.srcElement; var spanlocal=document.getElementById(spanvar); var checkboxobj=spanlocal.all("checkbox"); var flag=false; if(obj.checked==true){ flag=true; } for(i=0;i <span ID="xzqh"></span>
<script>
//区县地区
var x1=new Array(15);
x1[0]=new Array('<span id="span1" style="display:none">','','','')
x1[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="440101" />','市辖区','<br>');
x1[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="荔湾区" value="440103" />','荔湾区','<br>');
x1[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="越秀区" value="440104" />','越秀区','<br>');
x1[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="海珠区" value="440105" />','海珠区','<br>');
x1[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="天河区" value="440106" />','天河区','<br>');
x1[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="白云区" value="440111" />','白云区','<br>');
x1[7]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="黄埔区" value="440112" />','黄埔区','<br>');
x1[8]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="番禺区" value="440113" />','番禺区','<br>');
x1[9]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="花都区" value="440114" />','花都区','<br>');
x1[10]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="南沙区" value="440115" />','南沙区','<br>');
x1[11]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="萝岗区" value="440116" />','萝岗区','<br>');
x1[12]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="增城市" value="440183" />','增城市','<br>');
x1[13]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="从化市" value="440184" />','从化市','<br>');
x1[14]=new Array('</span>','','','');                                                                                 
var x2=new Array(13);                                                                                                  
x2[0]=new Array('<span id="span2" style="display:none">','','','')
x2[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="440201" />','市辖区','<br>');
x2[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="武江区" value="440203" />','武江区','<br>');
x2[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="浈江区" value="440204" />','浈江区','<br>');
x2[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="曲江区" value="440205" />','曲江区','<br>');
x2[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="始兴县" value="440222" />','始兴县','<br>');
x2[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="仁化县" value="440224" />','仁化县','<br>');
x2[7]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="翁源县" value="440229" />','翁源县','<br>');
x2[8]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="乳源瑶族自治县" value="440232" />','乳源瑶族自治县','<br>');
x2[9]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="新丰县" value="440233" />','新丰县','<br>');
x2[10]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="乐昌市" value="440281" />','乐昌市','<br>');
x2[11]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="南雄市" value="440282" />','南雄市','<br>');
x2[12]=new Array('</span>','','','');
var x3=new Array(9);
x3[0]=new Array('<span id="span3" style="display:none">','','','')
x3[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="440301" />','市辖区','<br>');
x3[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="罗湖区" value="440303" />','罗湖区','<br>');
x3[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="福田区" value="440304" />','福田区','<br>');
x3[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="南山区" value="440305" />','南山区','<br>');
x3[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="宝安区" value="440306" />','宝安区','<br>');
x3[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="龙岗区" value="440307" />','龙岗区','<br>');
x3[7]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="盐田区" value="440308" />','盐田区','<br>');
x3[8]=new Array('</span>','','','');
var x4=new Array(6);
x4[0]=new Array('<span id="span4" style="display:none">','','','')
x4[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="440401" />','市辖区','<br>');
x4[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="香洲区" value="440402" />','香洲区','<br>');
x4[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="斗门区" value="440403" />','斗门区','<br>');
x4[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="金湾区" value="440404" />','金湾区','<br>');
x4[5]=new Array('</span>','','','');
var x5=new Array(10);
x5[0]=new Array('<span id="span5" style="display:none">','','','')
x5[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="440501" />','市辖区','<br>');
x5[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="龙湖区" value="440507" />','龙湖区','<br>');
x5[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="金平区" value="440511" />','金平区','<br>');
x5[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="濠江区" value="440512" />','濠江区','<br>');
x5[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="潮阳区" value="440513" />','潮阳区','<br>');
x5[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="潮南区" value="440514" />','潮南区','<br>');
x5[7]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="澄海区" value="440515" />','澄海区','<br>');
x5[8]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="南澳县" value="440523" />','南澳县','<br>');
x5[9]=new Array('</span>','','','');
var x6=new Array(8);
x6[0]=new Array('<span id="span6" style="display:none">','','','')
x6[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="440601" />','市辖区','<br>');
x6[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="禅城区" value="440604" />','禅城区','<br>');
x6[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="南海区" value="440605" />','南海区','<br>');
x6[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="顺德区" value="440606" />','顺德区','<br>');
x6[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="三水区" value="440607" />','三水区','<br>');
x6[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="高明区" value="440608" />','高明区','<br>');
x6[7]=new Array('</span>','','','');
var x7=new Array(10);
x7[0]=new Array('<span id="span7" style="display:none">','','','')
x7[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="440701" />','市辖区','<br>');
x7[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="蓬江区" value="440703" />','蓬江区','<br>');
x7[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="江海区" value="440704" />','江海区','<br>');
x7[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="新会区" value="440705" />','新会区','<br>');
x7[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="台山市" value="440781" />','台山市','<br>');
x7[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="开平市" value="440783" />','开平市','<br>');
x7[7]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="鹤山市" value="440784" />','鹤山市','<br>');
x7[8]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="恩平市" value="440785" />','恩平市','<br>');
x7[9]=new Array('</span>','','','');
var x8=new Array(12);
x8[0]=new Array('<span id="span8" style="display:none">','','','')
x8[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="440801"/>','市辖区','<br>');
x8[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="赤坎区" value="440802"/>','赤坎区','<br>');
x8[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="霞山区" value="440803"/>','霞山区','<br>');
x8[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="坡头区" value="440804"/>','坡头区','<br>');
x8[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="麻章区" value="440811"/>','麻章区','<br>');
x8[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="遂溪县" value="440823"/>','遂溪县','<br>');
x8[7]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="徐闻县" value="440825"/>','徐闻县','<br>');
x8[8]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="廉江市" value="440881"/>','廉江市','<br>');
x8[9]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="雷州市" value="440882"/>','雷州市','<br>');
x8[10]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="吴川市" value="440883" />','吴川市','<br>');
x8[11]=new Array('</span>','','','');
var x9=new Array(9);
x9[0]=new Array('<span id="span9" style="display:none">','','','')
x9[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="440901"/>','市辖区','<br>');
x9[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="茂南区" value="440902"/>','茂南区','<br>');
x9[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="茂港区" value="440903"/>','茂港区','<br>');
x9[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="电白县" value="440923"/>','电白县','<br>');
x9[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="高州市" value="440981"/>','高州市','<br>');
x9[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="化州市" value="440982"/>','化州市','<br>');
x9[7]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="信宜市" value="440983"/>','信宜市','<br>');
x9[8]=new Array('</span>','','','');                                                                          
var x10=new Array(11);                                                                                         
x10[0]=new Array('<span id="span10" style="display:none">','','','')
x10[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="441201" />','市辖区','<br>');
x10[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="端州区" value="441202" />','端州区','<br>');
x10[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="鼎湖区" value="441203" />','鼎湖区','<br>');
x10[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="广宁县" value="441223" />','广宁县','<br>');
x10[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="怀集县" value="441224" />','怀集县','<br>');
x10[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="封开县" value="441225" />','封开县','<br>');
x10[7]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="德庆县" value="441226" />','德庆县','<br>');
x10[8]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="高要市" value="441283" />','高要市','<br>');
x10[9]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="四会市" value="441284" />','四会市','<br>');
x10[10]=new Array('</span>','','','');
var x11=new Array(8);
x11[0]=new Array('<span id="span11" style="display:none">','','','')                                                    
x11[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="441301" />','市辖区','<br>');
x11[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="惠城区" value="441302" />','惠城区','<br>');
x11[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="惠阳区" value="441303" />','惠阳区','<br>');
x11[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="博罗县" value="441322" />','博罗县','<br>');
x11[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="惠东县" value="441323" />','惠东县','<br>');
x11[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="龙门县" value="441324" />','龙门县','<br>');
x11[7]=new Array('</span>','','','');
var x12=new Array(11);
x12[0]=new Array('<span id="span12" style="display:none">','','','')
x12[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="441401" />','市辖区','<br>');
x12[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="梅江区" value="441402" />','梅江区','<br>');
x12[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="梅 县" value="441421" />','梅 县','<br>');
x12[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="大埔县" value="441422" />','大埔县','<br>');
x12[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="丰顺县" value="441423" />','丰顺县','<br>');
x12[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="五华县" value="441424" />','五华县','<br>');
x12[7]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="平远县" value="441426" />','平远县','<br>');
x12[8]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="蕉岭县" value="441427" />','蕉岭县','<br>');
x12[9]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="兴宁市" value="441481" />','兴宁市','<br>');
x12[10]=new Array('</span>','','','');
var x13=new Array(7);
x13[0]=new Array('<span id="span13" style="display:none">','','','')
x13[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="441501" />','市辖区','<br>');
x13[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="城 区" value="441502" />','城 区','<br>');
x13[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="海丰县" value="441521" />','海丰县','<br>');
x13[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="陆河县" value="441523" />','陆河县','<br>');
x13[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="陆丰市" value="441581" />','陆丰市','<br>');
x13[6]=new Array('</span>','','','');
var x14=new Array(9);
x14[0]=new Array('<span id="span14" style="display:none">','','','')
x14[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype=紫金县" value="441601" />','市辖区','<br>');
x14[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype=市辖区" value="441602" />','源城区','<br>');
x14[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype=源城区" value="441621" />','紫金县','<br>');
x14[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype=龙川县" value="441622" />','龙川县','<br>');
x14[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype=连平县" value="441623" />','连平县','<br>');
x14[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype=和平县" value="441624" />','和平县','<br>');
x14[7]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype=东源县" value="441625" />','东源县','<br>');
x14[8]=new Array('</span>','','','');
var x15=new Array(7);
x15[0]=new Array('<span id="span15" style="display:none">','','','')
x15[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="市辖区" />','市辖区','<br>');
x15[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="江城区" value="江城区" />','江城区','<br>');
x15[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="阳西县" value="阳西县" />','阳西县','<br>');
x15[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="阳东县" value="阳东县" />','阳东县','<br>');
x15[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="阳春市" value="阳春市" />','阳春市','<br>');
x15[6]=new Array('</span>','','','');
var x16=new Array(11);
x16[0]=new Array('<span id="span16" style="display:none">','','','')
x16[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="441801" />','市辖区','<br>');
x16[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="清城区" value="441802" />','清城区','<br>');
x16[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="佛冈县" value="441820" />','佛冈县','<br>');
x16[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="阳山县" value="441821" />','阳山县','<br>');
x16[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="连山壮" value="441823" />','连山壮','<br>');
x16[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="连南瑶族瑶族自治县" value="441825" />','连南瑶族瑶族自治县','<br>');
x16[7]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="清新县族自治县" value="441826" />','清新县族自治县','<br>');
x16[8]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="英德市" value="441827" />','英德市','<br>');
x16[9]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="连州市" value="441881" />','连州市','<br>');
x16[10]=new Array('</span>','','','');
var x17=new Array(2);
x17[0]=new Array('<span id="span17" style="display:none">','','','')
x17[1]=new Array('</span>','','','');
var x18=new Array(2);
x18[0]=new Array('<span id="span18" style="display:none">','','','')
x18[1]=new Array('</span>','','','');
var x19=new Array(6);
x19[0]=new Array('<span id="span19" style="display:none">','','','')
x19[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="445101" />','市辖区','<br>');
x19[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="湘桥区" value="445102" />','湘桥区','<br>');
x19[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="潮安县" value="445121" />','潮安县','<br>');
x19[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="饶平县" value="445122" />','饶平县','<br>');
x19[5]=new Array('</span>','','','');
var x20=new Array(8);
x20[0]=new Array('<span id="span20" style="display:none">','','','')
x20[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="445201" />','市辖区','<br>');
x20[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="榕城区" value="445202" />','榕城区','<br>');
x20[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="揭东县" value="445221" />','揭东县','<br>');
x20[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="揭西县" value="445222" />','揭西县','<br>');
x20[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="惠来县" value="445224" />','惠来县','<br>');
x20[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="普宁市" value="445281" />','普宁市','<br>');
x20[7]=new Array('</span>','','','');
var x21=new Array(8);
x21[0]=new Array('<span id="span21" style="display:none">','','','')
x21[1]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="市辖区" value="445301" />','市辖区','<br>');
x21[2]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="云城区" value="445302" />','云城区','<br>');
x21[3]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="新兴县" value="445321" />','新兴县','<br>');
x21[4]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="郁南县" value="445322" />','郁南县','<br>');
x21[5]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="云安县" value="445323" />','云安县','<br>');
x21[6]=new Array('&nbsp;&nbsp;','<input name="checkbox" type="checkbox" id="checkbox" customtype="罗定市" value="445381" />','罗定市','<br>');
x21[7]=new Array('</span>','','','');

//城市地区
var d=new Array(23);
d[0]=new Array('<span id="spancs">','','','')
d[1]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span1/')"  type="checkbox" id="checkbox" customtype="广州市" value="440100" />','<a href="#" οnclick=disp("span1")>广州市</a>','<br>',x1);
d[2]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span2/')"  type="checkbox" id="checkbox" customtype="韶关市" value="440200" />','<a href="#" οnclick=disp("span2")>韶关市</a>','<br>',x2);
d[3]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span3/')"  type="checkbox" id="checkbox" customtype="深圳市" value="440300" />','<a href="#" οnclick=disp("span3")>深圳市</a>','<br>',x3);
d[4]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span4/')"  type="checkbox" id="checkbox" customtype="珠海市" value="440400" />','<a href="#" οnclick=disp("span4")>珠海市</a>','<br>',x4);
d[5]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span5/')"  type="checkbox" id="checkbox" customtype="汕头市" value="440500" />','<a href="#" οnclick=disp("span5")>汕头市</a>','<br>',x5);
d[6]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span6/')"  type="checkbox" id="checkbox" customtype="佛山市" value="440600" />','<a href="#" οnclick=disp("span6")>佛山市</a>','<br>',x6);
d[7]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span7/')"  type="checkbox" id="checkbox" customtype="江门市" value="440700" />','<a href="#" οnclick=disp("span7")>江门市</a>','<br>',x7);
d[8]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span8/')"  type="checkbox" id="checkbox" customtype="湛江市" value="440800" />','<a href="#" οnclick=disp("span8")>湛江市</a>','<br>',x8);
d[9]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span9/')"  type="checkbox" id="checkbox" customtype="茂名市" value="440900" />','<a href="#" οnclick=disp("span9")>茂名市</a>','<br>',x9);
d[10]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span10/')"  type="checkbox" id="checkbox" customtype="肇庆市" value="441200" />','<a href="#" οnclick=disp("span10")>肇庆市</a>','<br>',x10);
d[11]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span11/')"  type="checkbox" id="checkbox" customtype="惠州市" value="441300" />','<a href="#" οnclick=disp("span11")>惠州市</a>','<br>',x11);
d[12]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span12/')"  type="checkbox" id="checkbox" customtype="梅州市" value="441400" />','<a href="#" οnclick=disp("span12")>梅州市</a>','<br>',x12);
d[13]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span13/')"  type="checkbox" id="checkbox" customtype="汕尾市" value="441500" />','<a href="#" οnclick=disp("span13")>汕尾市</a>','<br>',x13);
d[14]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span14/')"  type="checkbox" id="checkbox" customtype="河源市" value="441600" />','<a href="#" οnclick=disp("span14")>河源市</a>','<br>',x14);
d[15]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span15/')"  type="checkbox" id="checkbox" customtype="阳江市" value="441700" />','<a href="#" οnclick=disp("span15")>阳江市</a>','<br>',x15);
d[16]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span16/')"  type="checkbox" id="checkbox" customtype="清远市" value="441800" />','<a href="#" οnclick=disp("span16")>清远市</a>','<br>',x16);
d[17]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span17/')"  type="checkbox" id="checkbox" customtype="东莞市" value="441900" />','<a href="#" οnclick=disp("span17")>东莞市</a>','<br>',x17);
d[18]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span18/')"  type="checkbox" id="checkbox" customtype="中山市" value="442000" />','<a href="#" οnclick=disp("span18")>中山市</a>','<br>',x18);
d[19]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span19/')"  type="checkbox" id="checkbox" customtype="潮州市" value="445100" />','<a href="#" οnclick=disp("span19")>潮州市</a>','<br>',x19);
d[20]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span20/')"  type="checkbox" id="checkbox" customtype="揭阳市" value="445200" />','<a href="#" οnclick=disp("span20")>揭阳市</a>','<br>',x20);
d[21]=new Array('&nbsp;','<input name="checkbox" οnclick="checkall(/'span21/')"  type="checkbox" id="checkbox" customtype="云浮市" value="445300" />','<a href="#" οnclick=disp("span21")>云浮市</a>','<br>',x21);
d[22]=new Array('</span>','','','');
//省地区
var s=new Array('','<input name="checkbox" οnclick="checkall(/'spancs/')" type="checkbox" id="checkbox" customtype="广东省" value="440000" />','<a href="#" οnclick=disp("spancs")>广东省</a>','<br>',d);


//选区划
function sellocal(types,qhdm){
if(types=="d"){
        //替换逗号
var temp=d[qhdm].toString().replace(/,/g,' ');
}
else if(types=="x"){
    //替换逗号
var temp=x[qhdm].toString().replace(/,/g,' ');
}
else{
    var temp=s.toString().replace(/,/g,' ');
    }
//document.write(temp);
xzqh.innerHTML=temp;
}

function checkall(spanvar){
    var obj=event.srcElement;
    var spanlocal=document.getElementById(spanvar);
    var checkboxobj=spanlocal.all("checkbox");
    var flag=false;
    if(obj.checked==true){
        flag=true;
    }
    for(i=0;i<checkboxobj.length;i++){
            checkboxobj[i].checked=flag;
            }
       
    }

//显示或不显示;
function disp(vart){
    if(document.all(vart).style.display=='none'){
    document.all(vart).style.display='';
    return;
    }
    document.all(vart).style.display='none';
}
//CALL
sellocal('s','1');
</script>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值