js二级地域选择的实现方法_javascript技巧

WBOY
Release: 2016-05-16 17:32:08
Original
1237 people have browsed it

实现二级地域的选择,前端大概有两种表现形式,第一,你是去放上两个文本框,点击文本框一的时候,出现省列表,点击文本框二的时候,出现该省的市区列表;第二种就是放两个下拉框了,在第一个下拉框选中一个,再到第二个去选中相应的市区,当然还有别的方式,我这里就做一种,即下拉选择的,代码如下:
Html代码

复制代码代码如下:





无标题文档











本来打算用循环生成数组做演示的,可是想想,既然是二级地区的级联,那还是规范些好,这样大家看的清楚,选择上也清晰些,虽然这篇文章大都是地名.........
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!