Javascript supports the drop-down menu of province/city level 2 Association for area code input

Source: Internet
Author: User

The provincial/municipal level 2 linkage drop-down menu adds area code input. multiple sets of options share a group of data.
Select a region to obtain the region code. Enter the region code to automatically select a region.
The District codes of some cities are being collected. <Span onclick = "Inti (0)"> </P> <select name = "azone" id = "azone" onchange = "this. value = This. options [this. selectedindex]. value; altcls (); INPS. value = OPTN. options [0]. value; "> <option value =" Province "disabled> province </option> </SELECT> <select name =" CLS "id =" CLS "onchange =" If (this. options [0]. text! = 'Select City') INPS. value = This. options [this. selectedindex]. value; "> <option value =" 0 "> select city </option> </SELECT> <p> <input type =" text "id =" INPS "name =" INPS" size = "5" value = "" onkeyup = "If (this. value. length> 1) Inti (0); findarea (); "> </span> </P> <p> <span onclick =" Inti (1) "> </P> <select name =" azone "id =" azone1 "onchange =" this. value = This. options [this. selectedindex]. value; altcls (); INPS. value = OPTN. options [0]. value; "> <opti On value = "Province" disabled> province </option> </SELECT> <select name = "CLS" id = "cls1" onchange = "If (this. options [0]. text! = 'Select City') INPS. value = This. options [this. selectedindex]. value; "> <option value =" 0 "> select city </option> </SELECT> <p> <input type =" text "id =" inps1 "name =" INPS" size = "5" value = "" onkeyup = "If (this. value. length> 1) Inti (1); findarea (); "> </span> <br/>
[Ctrl + A select all Note: If you need to introduce external JS, You need to refresh it to execute]

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.