省市区三级联动jquery实现代码

2020-05-29 07:00:41易采站长站整理

<county id="131082" text="三河市"></county>
</city>
<city id="131100" text="衡水市">
<county id="131102" text="桃城区"></county>
<county id="131121" text="枣强县"></county>
<county id="131122" text="武邑县"></county>
<county id="131123" text="武强县"></county>
<county id="131124" text="饶阳县"></county>
<county id="131125" text="安平县"></county>
<county id="131126" text="故城县"></county>
<county id="131127" text="景县"></county>
<county id="131128" text="阜城县"></county>
<county id="131181" text="冀州市"></county>
<county id="131182" text="深州市"></county>
</city>
</prov>

好了,介绍一下效果:

刚开始的:


 

下拉选择省的,然后出现市的,选择了市的,然后出现了区的,最后选择区的时候,得到地址: