Git Product home page Git Product logo

Comments (3)

xiaohua1001 avatar xiaohua1001 commented on June 15, 2024 1
        $('#fromCityName').citypicker();
        //获取省份的值
        var aa=$("#fromCityName").next().find('span[data-count="province"]').attr('data-code');
        alert(aa);
        //获取城市的值
        var bb=$("#fromCityName").next().find('span[data-count="city"]').attr('data-code');
        alert(bb);
        //获取区县的值
        var cc=$("#fromCityName").next().find('span[data-count="district"]').attr('data-code');
        alert(cc);

from city-picker.

tshi0912 avatar tshi0912 commented on June 15, 2024
        $('input').val()发自网易邮箱大师
        在2016年07月28日 22:43,weishijun14 写道:我在做一个网站,然后用到您的插件,想请假选取了地址之后,如何获得我选的值?

不太清楚操作,恳请大牛能说详细点,谢谢!

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.

from city-picker.

tshi0912 avatar tshi0912 commented on June 15, 2024

v1.1.0新增了获取Code的功能,具体使用请参考如下:

// type 可以是: null或undefined(获取完整的code,以/分隔)、province(获取province的code)、city(获取city的code)、district(获取district的code)
$('.city-picker').data('citypicker').getCode(type);

from city-picker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.