JS Phone linkage Select region imitation iOS open source git

Source: Internet
Author: User

JS Mobile Phone Linkage selection region

Foreword: Because the net found a mobiscrool, compare whole, but not open source, can only try 15 days, the official edition unexpectedly wants 3,000 yuan, the poor can only do their own hands, wrote a only for the pop-window region selected.

All the resources on this site can be viewed on GitHub with source code GitHub

Demo address please click here http://www.lovewebgames.com/jsmodule/mobile-select-area.html

Mobile-select-area

Mobile phone linkage Selection region

Usage
##注:依赖于[dialog](https://github.com/tianxiangbing/dialog)
    <! doctype> 

  

Properties and methods Trigger:
    触发弹窗的DOM元素 ,可以是input或其他
Value
    初始值,
Data
    当data为json对象时可以直接解析    当data为string发送ajax请求后返回json,格式如下:
  {"        data": [{            "id": 1,            "name": "Zhejiang Province",            "child": [{                "id": "1",                "name": "Hangzhou City",                "child": [{                    "id": 1,                    "name": "Bingjiang District"                }]            }]        }, {            "id": 2,            "name": "Jiangsu Province",            "child": [{                "id": " 1 ",                " name ":" Nanjing ",                " child ": [{                    " id ": 1,                    " name ":" Liberated Area "                }]            }]        }, {            " id ": 3,            "name": "Hubei Province"        }]    }

  

Callback
    选中后的回调,默认有填充trigger的value值,以及赋值它后面紧跟着的hidden的value值,以逗号分隔id,空格分隔文字

JS Phone linkage Select region imitation iOS open source git

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.