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

City selector, with city selector source code download

PHP中文网
PHP中文网Original
2017-03-30 17:40:281422browse

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=&#39;text/javascript&#39;>
    //自定义配置
    var config = {
        province: &#39;#province&#39;,
        city: &#39;#city&#39;,
        area: &#39;#area&#39;
    };
    //初始化
    $(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!

Statement:
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