JS simple implementation of HTML tag select linkage with Jump _javascript tips

Source: Internet
Author: User
Copy Code code as follows:

<script src= "Scripts/jquery-1.9.1.min.js" type= "Text/javascript" ></script>

Copy Code code as follows:

<form name= "FORM5" id= "FORM5" action= "method=" post "target=" _blank "onsubmit=" document.charset= ' GB2312 '; return False ">
<tr>
&LT;TD nowrap= "nowrap" class= "Biao" > Query </td>
<td><select id= "domainnewhouse" name= "domain" onchange= "redirect2" (This.options.selectedIndex) >
<option value= "0" selected> area </option>
<option value= "1" > Jiang ' an </option>
<option value= "2" > Jianghan District </option>
<option value= "3" > Qiaokou District </option>
<option value= "4" > Dongxihu District </option>
<option value= "7" > Hanyang District </option>
<option value= "8" > Wuhan jing Kai </option>
<option value= "One" > Wuchang District </option>
<option value= "A" > Qingshan District </option>
<option value= "" > Hongshan District </option>
<option value= > East Lake High-tech zone </option>
<option value= "A" > Jiangxia </option>
<option value= "5" > Huangbei District </option>
<option value= "6" > Xinzhou District </option>
<option value= "9" > Caidian District </option>
<option value= "Ten" > Hannan District </option>
<option value= > Other </option>
</select></td>
<td><select name= "Pian" id= "Pianqu" style= "width:80px"; >
<option value= "" Selected> area </option></select>
<script src= "Scripts/jscript1.js" type= "Text/javascript" ></script>
</td>
<td><input name= "type=" button "value=" Search "style=" height:20px "class=" ANLV "onclick=" Gettaburl (' Shangpu ') "/></td>
</tr></FORM>

JSCRIPT1 Code:
Copy Code code as follows:

var groups = Document.form5.domain.options.length
var group = new Array (groups)
for (i = 0; i < groups; i++)
Group[i] = new Array ()

Riverbank
Group[1][0] = new Option (' No Limit ', ' 0 ');
GROUP[1][1] = new Option (' Dike angle Sang ', ' 17 ');
GROUP[1][2] = new Option (' 27 ', ' 18 ');
GROUP[1][3] = new Option (' Back Lake ', ' 19 ');
GROUP[1][4] = new Option (' Chua's Tianhua Bridge ', ' 20 ');
GROUP[1][5] = new Option (' Yongqing Huangpu ', ' 21 ');
GROUP[1][6] = new Option (' San Yang Lu ', ' 22 ');
GROUP[1][7] = new Option (' Taipei Road, Hong Kong Road ', ' 23 ');
GROUP[1][8] = new Option (' Jianghan road da Zhi Lu ', ' 24 ');
GROUP[1][9] = new Option (' Other ', ' 25 ');

Jianghan
Group[2][0] = new Option (' No Limit ', ' 0 ');
GROUP[2][1] = new Option (' Yang cha hu ', ' 26 ');
GROUP[2][2] = new Option (' Fu Xing cun Evergreen ', ' 27 ');
GROUP[2][3] = new Option (' Tanggu Pier ', ' 28 ');
GROUP[2][4] = new Option (' Wang Jia Dun CBD ', ' 29 ');
GROUP[2][5] = new Option (' Northwest Lake ', ' 30 ');
GROUP[2][6] = new Option (' Wugungwansong garden ', ' 31 ');
GROUP[2][7] = new Option (' Forward flower building ', ' 32 ');
GROUP[2][8] = new Option (' Other ', ' 33 ');


Bridge mouth
Group[3][0] = new Option (' No Limit ', ' 0 ');
GROUP[3][1] = new Option (' Wu Shenglu ', ' 34 ');
GROUP[3][2] = new Option (' Baofeng ', ' 35 ');
GROUP[3][3] = new Option (' Guan ', ' 36 ');
GROUP[3][4] = new Option (' Han Xi ', ' 37 ');
GROUP[3][5] = new Option (' Gutian ', ' 38 ');
GROUP[3][6] = new Option (' Other ', ' 39 ');


Dongxihu
Group[4][0] = new Option (' No Limit ', ' 0 ');
GROUP[4][1] = new Option (' Evergreen Garden ', ' 40 ');
GROUP[4][2] = new Option (' Gold and Silver Lake ', ' 41 ');
GROUP[4][3] = new Option (' Wujiashan ', ' 42 ');
GROUP[4][4] = new Option (' Kimbang General Road ', ' 43 ');
GROUP[4][5] = new Option (' Other ', ' 44 ');


Hanyang
Group[5][0] = new Option (' No Limit ', ' 0 ');
GROUP[5][1] = new Option (' Parrot Avenue Zhongjia ', ' 52 ');
GROUP[5][2] = new Option (' Wangjiawan qi Temple ', ' 53 ');
GROUP[5][3] = new Option (' Four new ', ' 54 ');
GROUP[5][4] = new Option (' Golden harmonica fracture ', ' 55 ');
GROUP[5][5] = new Option (' Other ', ' 56 ');

Wuhan Jing Kai
Group[6][0] = new Option (' No Limit ', ' 0 ');
GROUP[6][1] = new Option (' Zhuankou slice ', ' 57 ');
GROUP[6][2] = new Option (' Other ', ' 58 ');

Wuchang
Group[7][0] = new Option (' No Limit ', ' 0 ');
GROUP[7][1] = new Option (' Xudong ', ' 62 ');
GROUP[7][2] = new Option (' Yue Jia Mouth ', ' 63 ');
GROUP[7][3] = new Option (' Fruit lake ', ' 64 ');
GROUP[7][4] = new Option (' Jiyuqiao ', ' 65 ');
GROUP[7][5] = new Option (' Middle South T-Bridge ', ' 66 ');
GROUP[7][6] = new Option (' Small East Gate ', ' 67 ');
GROUP[7][7] = new Option (' Gate ', ' 68 ');
GROUP[7][8] = new Option (' Read racecourse Shouyi ', ' 69 ');
GROUP[7][9] = new Option (' Wu Tai Gate ', ' 70 ');
GROUP[7][10] = new Option (' Nanhu garden ', ' 71 ');
GROUP[7][11] = new Option (' Other ', ' 72 ');


Castle peak
Group[8][0] = new Option (' No Limit ', ' 0 ');
GROUP[8][1] = new Option (' Build two ', ' 73 ');
GROUP[8][2] = new Option (' Red Gangcheng ', ' 74 ');
GROUP[8][3] = new Option (' Other ', ' 75 ');

Hongshan
Group[9][0] = new Option (' No Limit ', ' 0 ');
GROUP[9][1] = new Option (' Luo Lions street Mouth ', ' 76 ');
GROUP[9][2] = new Option (' Zhuo DAO spring Tiger Spring ', ' 77 ');
GROUP[9][3] = new Option (' South Lake ', ' 78 ');
GROUP[9][4] = new Option (' White sandbar ', ' 79 ');
GROUP[9][5] = new Option (' Huang Jia Hu ', ' 80 ');
GROUP[9][6] = new Option (' Yangspring Lake ', ' 81 ');
GROUP[9][7] = new Option (' Other ', ' 82 ');


East Lake High-tech
Group[10][0] = new Option (' No Limit ', ' 0 ');
GROUP[10][1] = new Option (' Lu Xiang ', ' 88 ');
GROUP[10][2] = new Option (' Guan Shan ', ' 89 ');
GROUP[10][3] = new Option (' University Science Park ', ' 90 ');
GROUP[10][4] = new Option (' Tibetan Dragon Island ', ' 91 ');
GROUP[10][5] = new Option (' Huashan ', ' 92 ');
GROUP[10][6] = new Option (' Other ', ' 93 ');

Jiangxia
Group[11][0] = new Option (' No Limit ', ' 0 ');
GROUP[11][1] = new Option (' Liufang ', ' 83 ');
GROUP[11][2] = new Option (' Paper square ', ' 84 ');
GROUP[11][3] = new Option (' Temple Mountain ', ' 85 ');
GROUP[11][4] = new Option (' Bridge ', ' 86 ');
GROUP[11][5] = new Option (' Other ', ' 87 ');

Huangpi
Group[12][0] = new Option (' No Limit ', ' 0 ');
GROUP[12][1] = new Option (' Ex-Sichuan ', ' 45 ');
GROUP[12][2] = new Option (' Panlongcheng ', ' 46 ');
GROUP[12][3] = new Option (' Wu Lake ', ' 47 ');
GROUP[12][4] = new Option (' Other ', ' 48 ');

Xinzhou
Group[13][0] = new Option (' No Limit ', ' 0 ');
GROUP[13][1] = new Option (' Xinzhou town ', ' 49 ');
GROUP[13][2] = new Option (' Yang Luo ', ' 50 ');
GROUP[13][3] = new Option (' Other ', ' 51 ');

Caidian
Group[14][0] = new Option (' No Limit ', ' 0 ');
GROUP[14][1] = new Option (' Caidian ', ' 59 ');
GROUP[14][2] = new Option (' Other ', ' 60 ');

Hanna
Group[15][0] = new Option (' Hannan ', ' 61 ');

Other
Group[16][0] = new Option (' Other region ', ' 94 ');


var temp = Document.form5.pian
function Redirect2 (x) {
for (M = temp.options.length-1 m > 0; m--)
TEMP.OPTIONS[M] = null
for (i = 0; i < group[x].length; i++) {
Temp.options[i] = new Option (Group[x][i].text, Group[x][i].value)
}
Temp.options[0].selected = True
}
var Bdomainid = 0;
var Sdomainid = 0;
function Gettaburl (SHANGPU) {
Bdomainid = $ ("#domainNewHouse"). Val ();
Sdomainid = $ ("#pianqu"). Val ();
window.open ("Http://***.com.cn/houselist_" + Bdomainid + "_" + Sdomainid + "_0_0_0_0_0_0__2_2_1.html");
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.