• jquery地区选择插件


    jquery地区选择插件

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <title>jQuery移动端的收货地址中国省市县级联选择插件</title>
    <link type="text/css" rel="stylesheet" href="css/ydui.css?rev=@@hash"/>
    <link type="text/css" rel="stylesheet" href="css/demo.css"/>
    </head>
    
    <body>
    <section class="g-flexview">
        <section class="g-scrollview">
            <div class="m-celltitle">默认调用</div>
            <div class="m-cell">
                <div class="cell-item">
                    <div class="cell-left">所在地区:</div>
                    <div class="cell-right cell-arrow">
                        <input type="text" class="cell-input" readonly id="J_Address" placeholder="请选择收货地址">
                    </div>
                </div>
            </div>
    
            <div class="m-celltitle">设置默认值</div>
            <div class="m-cell">
                <div class="cell-item">
                    <div class="cell-left">所在地区:</div>
                    <div class="cell-right cell-arrow">
                        <input type="text" class="cell-input" readonly id="J_Address2" value="新疆 乌鲁木齐市 天山区" placeholder="请选择收货地址">
                    </div>
                </div>
            </div>
        </section>
    </section>
    
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/ydui.citys.js"></script>
    <script type="text/javascript" src="js/ydui.js"></script>
    <script type="text/javascript">
    //默认调用
    !function () {
    	var $target = $('#J_Address');
    
    	$target.citySelect();
    
    	$target.on('click', function (event) {
    		event.stopPropagation();
    		$target.citySelect('open');
    	});
    
    	$target.on('done.ydui.cityselect', function (ret) {
    		$(this).val(ret.provance + ' ' + ret.city + ' ' + ret.area);
    	});
    }();
    //设置默认值
    !function () {
    	var $target = $('#J_Address2');
    
    	$target.citySelect({
    		provance: '新疆',
    		city: '乌鲁木齐市',
    		area: '天山区'
    	});
    
    	$target.on('click', function (event) {
    		event.stopPropagation();
    		$target.citySelect('open');
    	});
    
    	$target.on('done.ydui.cityselect', function (ret) {
    		$(this).val(ret.provance + ' ' + ret.city + ' ' + ret.area);
    	});
    }();
    </script>
    </body>
    </html>
    

      

  • 相关阅读:
    nginx -s reload 时报错 [error] open() "/run/nginx.pid" failed (2: No such file or directory)
    系统调用(四):SSDT
    系统调用(三): 分析KiFastCallEntry(二)
    系统调用(二): 分析KiFastCallEntry(一)
    系统调用(一): 重写WriteProcessMemory
    CVE-2009-0927分析
    CVE-2008-0015分析
    CVE-2006-4868分析
    在linux上使用impdp命令时提示ORA-12154: TNS:could not resolve the connect identifier specified的问题
    破解myeclipse10失败的一个奇葩原因
  • 原文地址:https://www.cnblogs.com/newmiracle/p/12401844.html
Copyright © 2020-2023  润新知