基本信息
源码名称:手机端网页选择地址插件
源码大小:0.05M
文件格式:.zip
开发语言:Java
更新时间:2019-06-26
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
最近做手机端的网页开发,对于选择地址这个需求,我去网上弄了个插件,用户体验挺舒服的(挺赞的),但是有一些bug,被我修复了。因为地址是三级联动的,这个地方我也略微改了,也就是说,不用来做选择地址的插件也可以的,比如某些下拉框也可以拿来用。你也可以根据自己需求修改源码。
最近做手机端的网页开发,对于选择地址这个需求,我去网上弄了个插件,用户体验挺舒服的(挺赞的),但是有一些bug,被我修复了。因为地址是三级联动的,这个地方我也略微改了,也就是说,不用来做选择地址的插件也可以的,比如某些下拉框也可以拿来用。你也可以根据自己需求修改源码。
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Insert title here</title> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> <link rel="stylesheet" type="text/css" href="addresss/css/ydui.css"> <script type="text/javascript" src="addresss/ydui.flexible.js"></script> </head> <body> <input type="text" class="cell-input" readonly id="J_Address" value="" placeholder="请选择收货地址"> <input type="text" class="cell-input" readonly id="J_Address2" value="中国 新疆维吾尔自治区 乌鲁木齐市 天山区" placeholder="请选择收货地址"> <script type="text/javascript" src="addresss/ydui.citys.js"></script> <script type="text/javascript" src="addresss/ydui.js"></script> <script> /** * 默认调用 */ !function () { var $target = $('#J_Address'); $target.citySelect(); $target.on('click', function (event) { event.stopPropagation(); $target.citySelect('open'); }); $target.on('done.ydui.cityselect', function (ret) { console.log(ret) $(this).val(ret.country ' ' ret.provance ' ' ret.city ' ' ret.area); }); }(); /** * 设置默认值 */ !function () { var $target = $('#J_Address2'); $target.citySelect({ country: '中国', provance: '新疆维吾尔自治区', city: '乌鲁木齐市', area: '天山区', id: '1-31-330-3033' }); $target.on('click', function (event) { event.stopPropagation(); $target.citySelect('open'); }); $target.on('done.ydui.cityselect', function (ret) { console.log(ret); $(this).val(ret.country ' ' ret.provance ' ' ret.city ' ' ret.area); }); }(); </script> </body> </html>