Home > php教程 > php手册 > City selector, with city selector source code download

City selector, with city selector source code download

PHP中文网
Release: 2017-03-30 17:40:28
Original
1477 people have browsed it

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 after login

Copy code

Configure JS

<script type=&#39;text/javascript&#39;>
    //自定义配置
    var config = {
        province: &#39;#province&#39;,
        city: &#39;#city&#39;,
        area: &#39;#area&#39;
    };
    //初始化
    $(function () {
        selector(config);
    });
 </script>
Copy after login

Copy code

Use HTML

省:<select id="province"></select>
 市:<select id="city"></select>
 区:<select id="area"></select>
Copy after login

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!

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 Articles by Author
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template