City selector, with city selector source code download
Simple city selector code, with download!
Introduce JS
<script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="data.js"></script> <script type="text/javascript" src="selector.js"></script>
Copy code
Configure JS
<script type='text/javascript'> //自定义配置 var config = { province: '#province', city: '#city', area: '#area' }; //初始化 $(function () { selector(config); }); </script>
Copy code
Use HTML
省:<select id="province"></select> 市:<select id="city"></select> 区:<select id="area"></select>
Copy code
The above is the city selector, with the download of the city selector source code, more about simple cities Please pay attention to other articles on the PHP Chinese website for the selector code!