jQuery 登录验证(密码验证 字母加数字或符号的组合密码,不能单独使用数字、字母或字符)

Continue Read..
function validPsw() {  
    var password = $(".password").val();  
    var num = 0;  
    var number = 0 ;  
    var letter = 0 ;  
    var bigLetter = 0 ;  
    var chars = 0 ;  
      
    if (password.search(/[0-9]/) != -1) {  
        num += 1;  
        number =1;  
    }  
    if (password.search(/[A-Z]/) != -1) {  
        num += 1;  
        bigLetter = 1 ;  
    }  
    if (password.search(/[a-z]/) != -1) {  
        num += 1;  
        letter = 1 ;  
    }  
    if (password.search(/[^A-Za-z0-9]/) != -1) {  
        num += 1;  
        chars = 1 ;  
    }  
    if (num >= 2 && (password.length >= 6 && password.length <= 16)) {  
        $(".pswSpan").html("");  
        $(".password").css("border","#B0B0B0 solid 1px");  
    }else if(password.length < 6 || password.length > 16){  
        $(".pswSpan").html("密码由6-16个字符组成!");  
        $(".password").css("border","#B35D5D solid 1px");  
    }else if(num == 1){  
        if(number==1){  
            $(".pswSpan").html("不能全为数字!");  
        }  
        if(letter==1){  
            $(".pswSpan").html("不能全为字母!");  
        }  
        if(bigLetter==1){  
            $(".pswSpan").html("不能全为字母!");  
        }  
        if(chars==1){  
            $(".pswSpan").html("不能全为字符!");  
        }  
        $(".password").css("border","#B35D5D solid 1px");  
    }  
}  

声明:此文系舞林cuznwww.wulinlw.org)原创稿件,转载请保留版权

【YII2】手机归属地

Continue Read..

将插件放在 根目录下面  vendor

然后修改   /vendor/composerautoload_psr4.php  

加一列  'Easthing\\' => array($vendorDir . '/phonelocation-master/src'),

 

    /**

     * 获取手机 归属地   $My_fun->getTelArea("1361729xxxx");

     * @param unknown $tel

     */

    function getTelArea($tel){

        if(empty($tel)){

            return "";

        }

        $row = \Easthing\PhoneLocation::find($tel);

        return $row;

    }

 

参考地址  https://github.com/easthing/phonelocation

声明:此文系舞林cuznwww.wulinlw.org)原创稿件,转载请保留版权

jquery 地图

Continue Read..
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="keywords" content="高德地图api,高德api,高德地图API,高德云图,map api,高德LBS开放平台,地图开发,代码,O2O,LBS+,P2P,APP,POI,坐标转换,解决方案,成功案例,云图 " />
<meta name="description" content="高德LBS开放平台,为开发者提供免费的地图解决方案,覆盖JavaScript、Android、iOS、Windows、Webservice等平台,包含全球定位、数据检索、路线规划、实时导航、室内地图、街景等LBS功能。推广零成本开发工具:高德云图,将自有数据一键生成自定义地图,并自动适配PC端与移动端;地图组件,一句话搞定web地图;全球定位,体积最小、耗电量最低的定位SDK。" />
<title> | 高德地图API</title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="shortcut icon" href="http://lbs.amap.com/wp-content/themes/apiwebsite/images/favicon.ico?t=201410" />
<link rel="stylesheet" type="text/css" media="all" href="http://lbs.amap.com/wp-content/themes/apiwebsite/css/extra.min.css" />
<script type="text/javascript" src="http://lbs.amap.com/wp-content/themes/apiwebsite/js/jquery-1.9.1.min.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="http://lbs.amap.com/wp-content/themes/apiwebsite/style.css?t=20150918" />
</head>
<body>
<div class="page_wrapper">
<link rel='stylesheet' type='text/css' href='http://lbs.amap.com/console/public/console.css?t=20150918' media='all'>
<div class="main_content">
<style>
.clear{clear:both;float:none;font-size:0;height:0}.hide{display:none!important}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.pull-left{float:left}.pull-right{float:right}.required,.message-error{color:red;font-size:12px}.message-log{color:gray;font-size:12px}.message-debug{color:blue;font-size:12px}#mainCard{background:white;font-size:12px}#mainCard input[type=text],#mainCard select,#mainCard textarea{border:1px solid #bde0fd;height:24px;*line-height:24px;line-height:24px\0;width:256px}#mainCard input[type=text]{text-indent:5px}#mainCard select{width:258px}#txtName,#txtAddress{width:200px!important}#btnClick2Locate,#aLocateToMap{color:#067ec0}#cardLeft{width:350px;border-right:1px solid #e0edf4}#mainCard h3{border-bottom:1px solid #e0edf4;height:36px;line-height:36px;font-size:12px;margin:0}#mainCard label{display:inline-block;width:50px;text-align:right;font-weight:bold}#userImgHolder img{max-height:100px;max-width:256px;padding:1px;border:1px solid #ccc}#userImgHolder{padding-left:50px}#cardLeft>div>div{padding:5px 0}#cardLeft input[type=radio]{vertical-align:-3px;margin-right:3px}#cardLeft2 label.info-window-status{font-weight:normal}#cardLeft2 .desc-area label{vertical-align:top}#cardLeft2 .desc-area textarea{height:80px;resize:none}#cardLeft3 label{width:auto;font-weight:normal;margin-left:10px}#cardLeft3 input[type=text]{width:50px}#cardRight{float:right;width:570px;padding:15px 10px}#mapHolder{width:560px;height:440px;overflow:auto}#mapInst{margin:0 auto;position:relative;width:560px;height:440px}#cardRight4{padding-top:10px;width:560px}#cardRight4>div{padding:2px 0}#cardRight4 div input[type=text],#cardRight4 div textarea{display:block;width:554px}#cardRight4 textarea{height:40px;resize:none}#cardRight4 .card-btn{padding:0 18px}#mainCard .card-btn{background-color:#0075c2;display:inline-block;height:28px;line-height:28px;padding:0 24px;color:#fff;text-decoration:none}#mainCard .card-btn:hover,#mainCard .card-btn:focus{background-color:#3391ce}#iwc{width:300px}#iwc h4{font-size:14px;font-weight:600;border-bottom:2px solid #666;margin:0 0 8px;word-break:break-all;word-wrap:break-word;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#iwc img{border:1px solid #ccc;padding:2px;float:left;margin-right:10px;max-height:64px;max-width:96px;display:none}#iwc .cl{float:left}#iwc.has-img img{display:inline-block}#iwc.has-img #iwcRight{width:180px}#sugNameList{position:absolute;top:0;left:50px;width:202px;border:1px solid #999;border-top:0;background:#FFF;z-index:1}#sugNameList a{display:block;padding:0 8px;word-wrap:break-word;word-break:break-all;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;height:28px;line-height:28px;text-decoration:none;color:#666}#sugNameList .selected,#sugNameList a:hover,#sugNameList a:focus{background-color:#e3eaf2}#sugNameList span{color:#557495}
</style>
<div class="card dev_info_step_0">
<div id="mainCard" class="clearfix">
<div id="cardRight">
<div id="mapHolder">
<div id="mapInst"></div>
</div>
</div>
<div id="cardLeft" class="clearfix">
<div id="cardLeft1">
<div>
<label for="dpProvince">区县:</label><select id="dpProvince"></select>
</div>
<div>
<label></label><select id="dpCity"></select>
</div>
<div>
<label></label><select id="dpCountry"></select>
</div>
<div>
<label for="txtAddress"><span class="required">*</span>街道:</label> <input type="text" name="address" placeholder="请输入街道地址" id="txtAddress" maxlength="20">
<a href="javascript:;" id="aLocateToMap">定位到地图</a>
<a href="javascript:;" id="aClickLocate"></a>
</div>
<div id="msgAddress" class="message-error"></div>
</div>
</div>
</div>
<div id="iwc" class="hide">
<h4 id="iwcName"></h4>
<div class="clearfix">
<div id="iwcImg" class="cl"></div>
<div id="iwcRight" class="cl">
<div id="iwcAddress"></div>
<div id="iwcPhone"></div>
<div id="iwcDesc"></div>
</div>
</div>
</div>
</div>
<script src="http://webapi.amap.com/maps?v=1.3&key=213acaf38828fab4d9a6e9159c6a1de2"></script>
<script>
/*!
* ZeroClipboard
* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
* Copyright (c) 2014 Jon Rohan, James M. Greene
* Licensed MIT
* http://zeroclipboard.org/
* v1.3.2
*/
function add(dpProvince,dpCity,dpCountry){
this.dpProvince=dpProvince;
this.dpCity=dpCity;
this.dpCountry=dpCountry;
}
!function(){"use strict";function a(a){return a.replace(/,/g,".").replace(/[^0-9\.]/g,"")}function b(b){return parseFloat(a(b))>=10}var c,d={bridge:null,version:"0.0.0",disabled:null,outdated:null,ready:null},e={},f=0,g={},h=0,i={},j=null,k=null,l=function(){var a,b,c,d,e="ZeroClipboard.swf";if(document.currentScript&&(d=document.currentScript.src));else{var f=document.getElementsByTagName("script");if("readyState"in f[0])for(a=f.length;a--&&("interactive"!==f[a].readyState||!(d=f[a].src)););else if("loading"===document.readyState)d=f[f.length-1].src;else{for(a=f.length;a--;){if(c=f[a].src,!c){b=null;break}if(c=c.split("#")[0].split("?")[0],c=c.slice(0,c.lastIndexOf("/")+1),null==b)b=c;else if(b!==c){b=null;break}}null!==b&&(d=b)}}return d&&(d=d.split("#")[0].split("?")[0],e=d.slice(0,d.lastIndexOf("/")+1)+e),e}(),m=function(){var a=/\-([a-z])/g,b=function(a,b){return b.toUpperCase()};return function(c){return c.replace(a,b)}}(),n=function(a,b){var c,d,e;return window.getComputedStyle?c=window.getComputedStyle(a,null).getPropertyValue(b):(d=m(b),c=a.currentStyle?a.currentStyle[d]:a.style[d]),"cursor"!==b||c&&"auto"!==c||(e=a.tagName.toLowerCase(),"a"!==e)?c:"pointer"},o=function(a){a||(a=window.event);var b;this!==window?b=this:a.target?b=a.target:a.srcElement&&(b=a.srcElement),I.activate(b)},p=function(a,b,c){a&&1===a.nodeType&&(a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c))},q=function(a,b,c){a&&1===a.nodeType&&(a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c))},r=function(a,b){if(!a||1!==a.nodeType)return a;if(a.classList)return a.classList.contains(b)||a.classList.add(b),a;if(b&&"string"==typeof b){var c=(b||"").split(/\s+/);if(1===a.nodeType)if(a.className){for(var d=" "+a.className+" ",e=a.className,f=0,g=c.length;g>f;f++)d.indexOf(" "+c[f]+" ")<0&&(e+=" "+c[f]);a.className=e.replace(/^\s+|\s+$/g,"")}else a.className=b}return a},s=function(a,b){if(!a||1!==a.nodeType)return a;if(a.classList)return a.classList.contains(b)&&a.classList.remove(b),a;if(b&&"string"==typeof b||void 0===b){var c=(b||"").split(/\s+/);if(1===a.nodeType&&a.className)if(b){for(var d=(" "+a.className+" ").replace(/[\n\t]/g," "),e=0,f=c.length;f>e;e++)d=d.replace(" "+c[e]+" "," ");a.className=d.replace(/^\s+|\s+$/g,"")}else a.className=""}return a},t=function(){var a,b,c,d=1;return"function"==typeof document.body.getBoundingClientRect&&(a=document.body.getBoundingClientRect(),b=a.right-a.left,c=document.body.offsetWidth,d=Math.round(b/c*100)/100),d},u=function(a,b){var c={left:0,top:0,width:0,height:0,zIndex:A(b)-1};if(a.getBoundingClientRect){var d,e,f,g=a.getBoundingClientRect();"pageXOffset"in window&&"pageYOffset"in window?(d=window.pageXOffset,e=window.pageYOffset):(f=t(),d=Math.round(document.documentElement.scrollLeft/f),e=Math.round(document.documentElement.scrollTop/f));var h=document.documentElement.clientLeft||0,i=document.documentElement.clientTop||0;c.left=g.left+d-h,c.top=g.top+e-i,c.width="width"in g?g.width:g.right-g.left,c.height="height"in g?g.height:g.bottom-g.top}return c},v=function(a,b){var c=null==b||b&&b.cacheBust===!0&&b.useNoCache===!0;return c?(-1===a.indexOf("?")?"?":"&")+"noCache="+(new Date).getTime():""},w=function(a){var b,c,d,e=[],f=[],g=[];if(a.trustedOrigins&&("string"==typeof a.trustedOrigins?f.push(a.trustedOrigins):"object"==typeof a.trustedOrigins&&"length"in a.trustedOrigins&&(f=f.concat(a.trustedOrigins))),a.trustedDomains&&("string"==typeof a.trustedDomains?f.push(a.trustedDomains):"object"==typeof a.trustedDomains&&"length"in a.trustedDomains&&(f=f.concat(a.trustedDomains))),f.length)for(b=0,c=f.length;c>b;b++)if(f.hasOwnProperty(b)&&f[b]&&"string"==typeof f[b]){if(d=D(f[b]),!d)continue;if("*"===d){g=[d];break}g.push.apply(g,[d,"//"+d,window.location.protocol+"//"+d])}return g.length&&e.push("trustedOrigins="+encodeURIComponent(g.join(","))),"string"==typeof a.jsModuleId&&a.jsModuleId&&e.push("jsModuleId="+encodeURIComponent(a.jsModuleId)),e.join("&")},x=function(a,b,c){if("function"==typeof b.indexOf)return b.indexOf(a,c);var d,e=b.length;for("undefined"==typeof c?c=0:0>c&&(c=e+c),d=c;e>d;d++)if(b.hasOwnProperty(d)&&b[d]===a)return d;return-1},y=function(a){if("string"==typeof a)throw new TypeError("ZeroClipboard doesn't accept query strings.");return a.length?a:[a]},z=function(a,b,c,d){d?window.setTimeout(function(){a.apply(b,c)},0):a.apply(b,c)},A=function(a){var b,c;return a&&("number"==typeof a&&a>0?b=a:"string"==typeof a&&(c=parseInt(a,10))&&!isNaN(c)&&c>0&&(b=c)),b||("number"==typeof L.zIndex&&L.zIndex>0?b=L.zIndex:"string"==typeof L.zIndex&&(c=parseInt(L.zIndex,10))&&!isNaN(c)&&c>0&&(b=c)),b||0},B=function(a,b){if(a&&b!==!1&&"undefined"!=typeof console&&console&&(console.warn||console.log)){var c="`"+a+"` is deprecated. See docs for more info:\n    https://github.com/zeroclipboard/zeroclipboard/blob/master/docs/instructions.md#deprecations";console.warn?console.warn(c):console.log(c)}},C=function(){var a,b,c,d,e,f,g=arguments[0]||{};for(a=1,b=arguments.length;b>a;a++)if(null!=(c=arguments[a]))for(d in c)if(c.hasOwnProperty(d)){if(e=g[d],f=c[d],g===f)continue;void 0!==f&&(g[d]=f)}return g},D=function(a){if(null==a||""===a)return null;if(a=a.replace(/^\s+|\s+$/g,""),""===a)return null;var b=a.indexOf("//");a=-1===b?a:a.slice(b+2);var c=a.indexOf("/");return a=-1===c?a:-1===b||0===c?null:a.slice(0,c),a&&".swf"===a.slice(-4).toLowerCase()?null:a||null},E=function(){var a=function(a,b){var c,d,e;if(null!=a&&"*"!==b[0]&&("string"==typeof a&&(a=[a]),"object"==typeof a&&"length"in a))for(c=0,d=a.length;d>c;c++)if(a.hasOwnProperty(c)&&(e=D(a[c]))){if("*"===e){b.length=0,b.push("*");break}-1===x(e,b)&&b.push(e)}},b={always:"always",samedomain:"sameDomain",never:"never"};return function(c,d){var e,f=d.allowScriptAccess;if("string"==typeof f&&(e=f.toLowerCase())&&/^always|samedomain|never$/.test(e))return b[e];var g=D(d.moviePath);null===g&&(g=c);var h=[];a(d.trustedOrigins,h),a(d.trustedDomains,h);var i=h.length;if(i>0){if(1===i&&"*"===h[0])return"always";if(-1!==x(c,h))return 1===i&&c===g?"sameDomain":"always"}return"never"}}(),F=function(a){if(null==a)return[];if(Object.keys)return Object.keys(a);var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b},G=function(a){if(a)for(var b in a)a.hasOwnProperty(b)&&delete a[b];return a},H=function(){var a=!1;if("boolean"==typeof d.disabled)a=d.disabled===!1;else{if("function"==typeof ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(a=!0)}catch(b){}!a&&navigator.mimeTypes["application/x-shockwave-flash"]&&(a=!0)}return a},I=function(a,b){return this instanceof I?(this.id=""+f++,g[this.id]={instance:this,elements:[],handlers:{}},a&&this.clip(a),"undefined"!=typeof b&&(B("new ZeroClipboard(elements, options)",L.debug),I.config(b)),this.options=I.config(),"boolean"!=typeof d.disabled&&(d.disabled=!H()),d.disabled===!1&&d.outdated!==!0&&null===d.bridge&&(d.outdated=!1,d.ready=!1,M()),void 0):new I(a,b)};I.prototype.setText=function(a){return a&&""!==a&&(e["text/plain"]=a,d.ready===!0&&d.bridge&&d.bridge.setText(a)),this},I.prototype.setSize=function(a,b){return d.ready===!0&&d.bridge&&d.bridge.setSize(a,b),this};var J=function(a){d.ready===!0&&d.bridge&&d.bridge.setHandCursor(a)};I.prototype.destroy=function(){this.unclip(),this.off(),delete g[this.id]};var K=function(){var a,b,c,d=[],e=F(g);for(a=0,b=e.length;b>a;a++)c=g[e[a]].instance,c&&c instanceof I&&d.push(c);return d};I.version="1.3.2";var L={swfPath:l,trustedDomains:window.location.host?[window.location.host]:[],cacheBust:!0,forceHandCursor:!1,zIndex:999999999,debug:!0,title:null,autoActivate:!0};I.config=function(a){"object"==typeof a&&null!==a&&C(L,a);{if("string"!=typeof a||!a){var b={};for(var c in L)L.hasOwnProperty(c)&&(b[c]="object"==typeof L[c]&&null!==L[c]?"length"in L[c]?L[c].slice(0):C({},L[c]):L[c]);return b}if(L.hasOwnProperty(a))return L[a]}},I.destroy=function(){I.deactivate();for(var a in g)if(g.hasOwnProperty(a)&&g[a]){var b=g[a].instance;b&&"function"==typeof b.destroy&&b.destroy()}var c=N(d.bridge);c&&c.parentNode&&(c.parentNode.removeChild(c),d.ready=null,d.bridge=null)},I.activate=function(a){c&&(s(c,L.hoverClass),s(c,L.activeClass)),c=a,r(a,L.hoverClass),O();var b=L.title||a.getAttribute("title");if(b){var e=N(d.bridge);e&&e.setAttribute("title",b)}var f=L.forceHandCursor===!0||"pointer"===n(a,"cursor");J(f)},I.deactivate=function(){var a=N(d.bridge);a&&(a.style.left="0px",a.style.top="-9999px",a.removeAttribute("title")),c&&(s(c,L.hoverClass),s(c,L.activeClass),c=null)};var M=function(){var a,b,c=document.getElementById("global-zeroclipboard-html-bridge");if(!c){var e=I.config();e.jsModuleId="string"==typeof j&&j||"string"==typeof k&&k||null;var f=E(window.location.host,L),g=w(e),h=L.moviePath+v(L.moviePath,L),i='      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="global-zeroclipboard-flash-bridge" width="100%" height="100%">         <param name="movie" value="'+h+'"/>         <param name="allowScriptAccess" value="'+f+'"/>         <param name="scale" value="exactfit"/>         <param name="loop" value="false"/>         <param name="menu" value="false"/>         <param name="quality" value="best" />         <param name="bgcolor" value="#ffffff"/>         <param name="wmode" value="transparent"/>         <param name="flashvars" value="'+g+'"/>         <embed src="'+h+'"           loop="false" menu="false"           quality="best" bgcolor="#ffffff"           width="100%" height="100%"           name="global-zeroclipboard-flash-bridge"           allowScriptAccess="'+f+'"           allowFullScreen="false"           type="application/x-shockwave-flash"           wmode="transparent"           pluginspage="http://www.macromedia.com/go/getflashplayer"           flashvars="'+g+'"           scale="exactfit">         </embed>       </object>';c=document.createElement("div"),c.id="global-zeroclipboard-html-bridge",c.setAttribute("class","global-zeroclipboard-container"),c.style.position="absolute",c.style.left="0px",c.style.top="-9999px",c.style.width="15px",c.style.height="15px",c.style.zIndex=""+A(L.zIndex),document.body.appendChild(c),c.innerHTML=i}a=document["global-zeroclipboard-flash-bridge"],a&&(b=a.length)&&(a=a[b-1]),d.bridge=a||c.children[0].lastElementChild},N=function(a){for(var b=/^OBJECT|EMBED$/,c=a&&a.parentNode;c&&b.test(c.nodeName)&&c.parentNode;)c=c.parentNode;return c||null},O=function(){if(c){var a=u(c,L.zIndex),b=N(d.bridge);b&&(b.style.top=a.top+"px",b.style.left=a.left+"px",b.style.width=a.width+"px",b.style.height=a.height+"px",b.style.zIndex=a.zIndex+1),d.ready===!0&&d.bridge&&d.bridge.setSize(a.width,a.height)}return this};I.prototype.on=function(a,b){var c,e,f,h={},i=g[this.id]&&g[this.id].handlers;if("string"==typeof a&&a)f=a.toLowerCase().split(/\s+/);else if("object"==typeof a&&a&&"undefined"==typeof b)for(c in a)a.hasOwnProperty(c)&&"string"==typeof c&&c&&"function"==typeof a[c]&&this.on(c,a[c]);if(f&&f.length){for(c=0,e=f.length;e>c;c++)a=f[c].replace(/^on/,""),h[a]=!0,i[a]||(i[a]=[]),i[a].push(b);h.noflash&&d.disabled&&R.call(this,"noflash",{}),h.wrongflash&&d.outdated&&R.call(this,"wrongflash",{flashVersion:d.version}),h.load&&d.ready&&R.call(this,"load",{flashVersion:d.version})}return this},I.prototype.off=function(a,b){var c,d,e,f,h,i=g[this.id]&&g[this.id].handlers;if(0===arguments.length)f=F(i);else if("string"==typeof a&&a)f=a.split(/\s+/);else if("object"==typeof a&&a&&"undefined"==typeof b)for(c in a)a.hasOwnProperty(c)&&"string"==typeof c&&c&&"function"==typeof a[c]&&this.off(c,a[c]);if(f&&f.length)for(c=0,d=f.length;d>c;c++)if(a=f[c].toLowerCase().replace(/^on/,""),h=i[a],h&&h.length)if(b)for(e=x(b,h);-1!==e;)h.splice(e,1),e=x(b,h,e);else i[a].length=0;return this},I.prototype.handlers=function(a){var b,c=null,d=g[this.id]&&g[this.id].handlers;if(d){if("string"==typeof a&&a)return d[a]?d[a].slice(0):null;c={};for(b in d)d.hasOwnProperty(b)&&d[b]&&(c[b]=d[b].slice(0))}return c};var P=function(a,b,c,d){var e=g[this.id]&&g[this.id].handlers[a];if(e&&e.length){var f,h,i,j=b||this;for(f=0,h=e.length;h>f;f++)i=e[f],b=j,"string"==typeof i&&"function"==typeof window[i]&&(i=window[i]),"object"==typeof i&&i&&"function"==typeof i.handleEvent&&(b=i,i=i.handleEvent),"function"==typeof i&&z(i,b,c,d)}return this};I.prototype.clip=function(a){a=y(a);for(var b=0;b<a.length;b++)if(a.hasOwnProperty(b)&&a[b]&&1===a[b].nodeType){a[b].zcClippingId?-1===x(this.id,i[a[b].zcClippingId])&&i[a[b].zcClippingId].push(this.id):(a[b].zcClippingId="zcClippingId_"+h++,i[a[b].zcClippingId]=[this.id],L.autoActivate===!0&&p(a[b],"mouseover",o));var c=g[this.id].elements;-1===x(a[b],c)&&c.push(a[b])}return this},I.prototype.unclip=function(a){var b=g[this.id];if(b){var c,d=b.elements;a="undefined"==typeof a?d.slice(0):y(a);for(var e=a.length;e--;)if(a.hasOwnProperty(e)&&a[e]&&1===a[e].nodeType){for(c=0;-1!==(c=x(a[e],d,c));)d.splice(c,1);var f=i[a[e].zcClippingId];if(f){for(c=0;-1!==(c=x(this.id,f,c));)f.splice(c,1);0===f.length&&(L.autoActivate===!0&&q(a[e],"mouseover",o),delete a[e].zcClippingId)}}}return this},I.prototype.elements=function(){var a=g[this.id];return a&&a.elements?a.elements.slice(0):[]};var Q=function(a){var b,c,d,e,f,h=[];if(a&&1===a.nodeType&&(b=a.zcClippingId)&&i.hasOwnProperty(b)&&(c=i[b],c&&c.length))for(d=0,e=c.length;e>d;d++)f=g[c[d]].instance,f&&f instanceof I&&h.push(f);return h};L.hoverClass="zeroclipboard-is-hover",L.activeClass="zeroclipboard-is-active",L.trustedOrigins=null,L.allowScriptAccess=null,L.useNoCache=!0,L.moviePath="ZeroClipboard.swf",I.detectFlashSupport=function(){return B("ZeroClipboard.detectFlashSupport",L.debug),H()},I.dispatch=function(a,b){if("string"==typeof a&&a){var d=a.toLowerCase().replace(/^on/,"");if(d)for(var e=c?Q(c):K(),f=0,g=e.length;g>f;f++)R.call(e[f],d,b)}},I.prototype.setHandCursor=function(a){return B("ZeroClipboard.prototype.setHandCursor",L.debug),a="boolean"==typeof a?a:!!a,J(a),L.forceHandCursor=a,this},I.prototype.reposition=function(){return B("ZeroClipboard.prototype.reposition",L.debug),O()},I.prototype.receiveEvent=function(a,b){if(B("ZeroClipboard.prototype.receiveEvent",L.debug),"string"==typeof a&&a){var c=a.toLowerCase().replace(/^on/,"");c&&R.call(this,c,b)}},I.prototype.setCurrent=function(a){return B("ZeroClipboard.prototype.setCurrent",L.debug),I.activate(a),this},I.prototype.resetBridge=function(){return B("ZeroClipboard.prototype.resetBridge",L.debug),I.deactivate(),this},I.prototype.setTitle=function(a){if(B("ZeroClipboard.prototype.setTitle",L.debug),a=a||L.title||c&&c.getAttribute("title")){var b=N(d.bridge);b&&b.setAttribute("title",a)}return this},I.setDefaults=function(a){B("ZeroClipboard.setDefaults",L.debug),I.config(a)},I.prototype.addEventListener=function(a,b){return B("ZeroClipboard.prototype.addEventListener",L.debug),this.on(a,b)},I.prototype.removeEventListener=function(a,b){return B("ZeroClipboard.prototype.removeEventListener",L.debug),this.off(a,b)},I.prototype.ready=function(){return B("ZeroClipboard.prototype.ready",L.debug),d.ready===!0};var R=function(f,g){f=f.toLowerCase().replace(/^on/,"");var h=g&&g.flashVersion&&a(g.flashVersion)||null,i=c,j=!0;switch(f){case"load":if(h){if(!b(h))return R.call(this,"onWrongFlash",{flashVersion:h}),void 0;d.outdated=!1,d.ready=!0,d.version=h}break;case"wrongflash":h&&!b(h)&&(d.outdated=!0,d.ready=!1,d.version=h);break;case"mouseover":r(i,L.hoverClass);break;case"mouseout":L.autoActivate===!0&&I.deactivate();break;case"mousedown":r(i,L.activeClass);break;case"mouseup":s(i,L.activeClass);break;case"datarequested":var k=i.getAttribute("data-clipboard-target"),l=k?document.getElementById(k):null;if(l){var m=l.value||l.textContent||l.innerText;m&&this.setText(m)}else{var n=i.getAttribute("data-clipboard-text");n&&this.setText(n)}j=!1;break;case"complete":G(e)}var o=i,p=[this,g];return P.call(this,f,o,p,j)};"function"==typeof define&&define.amd?define(["require","exports","module"],function(a,b,c){return j=c&&c.id||null,I}):"object"==typeof module&&module&&"object"==typeof module.exports&&module.exports?(k=module.id||null,module.exports=I):window.ZeroClipboard=I}();</script>
<script>
var hex_md5 = (function(){
var hexcase = 0;  /* hex output format. 0 - lowercase; 1 - uppercase        */
var b64pad  = ""; /* base-64 pad character. "=" for strict RFC compliance   */
var chrsz   = 8;  /* bits per input character. 8 - ASCII; 16 - Unicode      */
function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));}
function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));}
function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));}
function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); }
function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); }
function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); }
/*
* Perform a simple self-test to see if the VM is working
*/
function md5_vm_test()
{
return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
}
/*
* Calculate the MD5 of an array of little-endian words, and a bit length
*/
function core_md5(x, len)
{
/* append padding */
x[len >> 5] |= 0x80 << ((len) % 32);
x[(((len + 64) >>> 9) << 4) + 14] = len;
var a =  1732584193;
var b = -271733879;
var c = -1732584194;
var d =  271733878;
for(var i = 0; i < x.length; i += 16)
{
var olda = a;
var oldb = b;
var oldc = c;
var oldd = d;
a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
c = md5_ff(c, d, a, b, x[i+ 2], 17,  606105819);
b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
d = md5_ff(d, a, b, c, x[i+ 5], 12,  1200080426);
c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
a = md5_ff(a, b, c, d, x[i+ 8], 7 ,  1770035416);
d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
a = md5_ff(a, b, c, d, x[i+12], 7 ,  1804603682);
d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
b = md5_ff(b, c, d, a, x[i+15], 22,  1236535329);
a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
c = md5_gg(c, d, a, b, x[i+11], 14,  643717713);
b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
d = md5_gg(d, a, b, c, x[i+10], 9 ,  38016083);
c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
a = md5_gg(a, b, c, d, x[i+ 9], 5 ,  568446438);
d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
b = md5_gg(b, c, d, a, x[i+ 8], 20,  1163531501);
a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
c = md5_gg(c, d, a, b, x[i+ 7], 14,  1735328473);
b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
c = md5_hh(c, d, a, b, x[i+11], 16,  1839030562);
b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
d = md5_hh(d, a, b, c, x[i+ 4], 11,  1272893353);
c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
a = md5_hh(a, b, c, d, x[i+13], 4 ,  681279174);
d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
b = md5_hh(b, c, d, a, x[i+ 6], 23,  76029189);
a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
c = md5_hh(c, d, a, b, x[i+15], 16,  530742520);
b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
d = md5_ii(d, a, b, c, x[i+ 7], 10,  1126891415);
c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
a = md5_ii(a, b, c, d, x[i+12], 6 ,  1700485571);
d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
a = md5_ii(a, b, c, d, x[i+ 8], 6 ,  1873313359);
d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
b = md5_ii(b, c, d, a, x[i+13], 21,  1309151649);
a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
c = md5_ii(c, d, a, b, x[i+ 2], 15,  718787259);
b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
a = safe_add(a, olda);
b = safe_add(b, oldb);
c = safe_add(c, oldc);
d = safe_add(d, oldd);
}
return Array(a, b, c, d);
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function md5_cmn(q, a, b, x, s, t)
{
return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
}
function md5_ff(a, b, c, d, x, s, t)
{
return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
}
function md5_gg(a, b, c, d, x, s, t)
{
return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
}
function md5_hh(a, b, c, d, x, s, t)
{
return md5_cmn(b ^ c ^ d, a, b, x, s, t);
}
function md5_ii(a, b, c, d, x, s, t)
{
return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
}
/*
* Calculate the HMAC-MD5, of a key and some data
*/
function core_hmac_md5(key, data)
{
var bkey = str2binl(key);
if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz);
var ipad = Array(16), opad = Array(16);
for(var i = 0; i < 16; i++)
{
ipad[i] = bkey[i] ^ 0x36363636;
opad[i] = bkey[i] ^ 0x5C5C5C5C;
}
var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);
return core_md5(opad.concat(hash), 512 + 128);
}
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safe_add(x, y)
{
var lsw = (x & 0xFFFF) + (y & 0xFFFF);
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
return (msw << 16) | (lsw & 0xFFFF);
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function bit_rol(num, cnt)
{
return (num << cnt) | (num >>> (32 - cnt));
}
/*
* Convert a string to an array of little-endian words
* If chrsz is ASCII, characters >255 have their hi-byte silently ignored.
*/
function str2binl(str)
{
var bin = Array();
var mask = (1 << chrsz) - 1;
for(var i = 0; i < str.length * chrsz; i += chrsz)
bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32);
return bin;
}
/*
* Convert an array of little-endian words to a string
*/
function binl2str(bin)
{
var str = "";
var mask = (1 << chrsz) - 1;
for(var i = 0; i < bin.length * 32; i += chrsz)
str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask);
return str;
}
/*
* Convert an array of little-endian words to a hex string.
*/
function binl2hex(binarray)
{
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
var str = "";
for(var i = 0; i < binarray.length * 4; i++)
{
str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +
hex_tab.charAt((binarray[i>>2] >> ((i%4)*8  )) & 0xF);
}
return str;
}
/*
* Convert an array of little-endian words to a base-64 string
*/
function binl2b64(binarray)
{
var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var str = "";
for(var i = 0; i < binarray.length * 4; i += 3)
{
var triplet = (((binarray[i   >> 2] >> 8 * ( i   %4)) & 0xFF) << 16)
| (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 )
|  ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF);
for(var j = 0; j < 4; j++)
{
if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
}
}
return str;
}
return hex_md5;
})();/**
* 作者: 张国防
* 时间: 4/29 16:38
* 邮箱: newdefence@163.com
* 描述: 文件描述
* To change this template use File | Settings | File Templates.
*/
!function($){
var mapObj,
allLevel = 4, provinceLevel = 7, cityLevel = 9,
optDefaultProvince= '<option value="100000">省份</option>',
optDefaultCity= '<option value="100000">地级市</option>',
optDefaultCountry = '<option value="100000">区/县</option>',
$dpProvince = $("#dpProvince").html(optDefaultProvince),
$dpCity = $("#dpCity").html(optDefaultCity),
$dpCountry = $("#dpCountry").html(optDefaultCountry),
//url: http://restapi.amap.com/v3/config/district?key=8325164e247e15eea68b59e89200988b&subdistrict=2
provinceObj = {}, cityObj = {}, countryObj = {};
$.ajax("http://restapi.amap.com/v3/config/district?output=jsonp&key=8325164e247e15eea68b59e89200988b&subdistrict=3",{
dataType: "jsonp",
success: function(data){
var p, pl, c, cl, t, tl, html, provinces = data.districts[0].districts, cities, countries, province, city, country;
for(p = 0, pl = provinces.length, html = [optDefaultProvince]; p < pl; p++){
province = provinces[p];
provinceObj[province.adcode] = provinceObj[province.name] = province;
cityObj[province.adcode] =cityObj[province.name] = province; // 直辖市在 formattedAddress 中有问题,需要用 name 访问
for(c = 0, cities = province.districts, cl = cities.length; c < cl; c++){
city = cities[c];
cityObj[city.adcode] = cityObj[city.name] = city;
for(t = 0, countries = city.districts, tl = countries.length; t< tl; t++){
country = countries[t];
countryObj[country.adcode] = countryObj[country.name] = country;
}
}
html.push('<option title="'+ province.adcode +'" value="' + province.name + '">' + province.name + '</option>');
}
$dpProvince.html(html.join(""));
}
});
var fnInitDpCity = function(province){
var html=[optDefaultCity], cities, j, jl;
cities = provinceObj[province].districts; //2级城市列表
for(j = 0, jl = cities.length; j < jl; j++){
html.push("<option title=\""+cities[j].adcode+"\" value=\"" + cities[j].name + "\">" + cities[j].name +"</option>");
}
$dpCity.html(html.join(""));
};
$dpProvince.on("change", function(){
//重新设置地图范围,分全国和省市2种情况
var province = this.value, level = allLevel, lng=116.3683244, lat=39.915085;
if(province != "100000"){
fnInitDpCity(province);
lat = provinceObj[province].center.split(",");
lng = lat[0]; lat = lat[1]; level = provinceLevel;
}
mapObj.setZoomAndCenter(level, new AMap.LngLat(lng, lat));
$dpCountry.html(optDefaultCountry);
});
var fnInitDpCountry = function(city){
var districts = cityObj[city].districts, country;
for(var j = 0, jl = districts.length, html = [optDefaultCountry]; j < jl; j++){
country = districts[j];
countryObj[country.adcode] = countryObj[country.name] = country;
html.push('<option title="'+country.adcode+'" value="' + country.name + '">' + country.name + '</option>');
}
$dpCountry.html(html.join(""));
};
$dpCity.on("change", function(){
var code = this.value, lng, lat, level = cityLevel, obj;
if(code == "100000"){
level = provinceLevel;
obj = provinceObj[$dpProvince[0].value];
$dpCountry.html(optDefaultCountry);
}
else{
obj = cityObj[code];
fnInitDpCountry(code);
}
lat = obj.center.split(","); lng = lat[0]; lat = lat[1];
mapObj.setZoomAndCenter(level, new AMap.LngLat(lng, lat));
});
$dpCountry.on("change", function(){
var code = this.value, level = 12, lng, lat, obj;
if(code == "100000"){
level = cityLevel;
obj = cityObj[$dpCity[0].value];
}
else{ obj = countryObj[code]; }
lat = obj.center.split(","); lng = lat[0]; lat = lat[1];
mapObj.setZoomAndCenter(level, new AMap.LngLat(lng, lat));
});
var $txtAddress = $("#txtAddress").on("keyup", function(e){
if(e.keyCode==13){
setTimeout(fnGoSearch, 9);
}
}),
$msgAddress = $("#msgAddress"),
fnShowMessage = function($holder, msg){
$holder.html(msg).removeClass("hide").css("display", "block");
setTimeout(function(){
$holder.fadeOut("slow", function(){ $holder.addClass("hide"); });
}, 600);
},
marker, infoWindow, geoCoder, $infoWindow = $("#iwc"),
// fnMarkerClick = function(){
// if(infoWindow && $txtUrl[0].value.length > 10){ //保证已经生成URL
// infoWindow.open(mapObj, marker.getPosition());
// }
// hh();
//// clickLocateListener = "undefined";
// },
fnGeoCoder = function(result){
//通过地址定位
if(result.geocodes && result.geocodes.length){
var geo = result.geocodes[0];
if(clickLocateListener){ AMap.event.removeListener(clickLocateListener);  clickLocateListener = null; }
if(!marker){
marker = new AMap.Marker({map: mapObj, position: geo.location, offset: new AMap.Pixel(-10,-34),
content:'<img style="width:32px;height:34px;z-index:300;" src="http://webapi.amap.com/images/marker_sprite.png" />', title:geo.formattedAddress});
// AMap.event.addListener(marker, "click", fnMarkerClick);
}
else{
marker.setPosition(geo.location);
marker.setTitle(geo.formattedAddress);
}
mapObj.setCenter(geo.location);
//$txtAddress[0].value = geo.formattedAddress;
}
//通过 点击地图进行定位;
else if(result.regeocode && result.regeocode.addressComponent){
var address = result.regeocode.addressComponent, realCity = address.city ? cityObj[address.city] : provinceObj[address.province].districts[0];
$dpProvince.val(provinceObj[address.province].name);
var province,city,country;
$("#dpProvince option").each(function(){
if($(this).val() == provinceObj[address.province].name){
province = $(this).text();
}
})
fnInitDpCity(address.province);
$dpCity.val(realCity.name);
$("#dpCity option").each(function(){
if($(this).val() == realCity.name){
city = $(this).text();
}
})
fnInitDpCountry(realCity.adcode); //直辖市情况,特殊处理,按照 province 处理;
$dpCountry.val(countryObj[address.district].name);
$("#dpCountry option").each(function(){
if($(this).val() == countryObj[address.district].name){
country = $(this).text();
}
})
var newAddress=new add(province,city,country);
console.log(newAddress); 
// $txtAddress[0].value = ((address.township||"") + (address.street || "")) || result.regeocode.formattedAddress;
$txtAddress[0].value = address.street || result.regeocode.formattedAddress;
}
else{ fnShowMessage($msgAddress, "地理信息获取失败!"); }
}, fnGoSearch = function(){
var address = $.trim($txtAddress[0].value), city;
if(address){
city = $dpCity[0].value;
if(city == "100000"){
city = $dpProvince[0].value;
if(city == "100000"){
city = "全国";
}
}
$msgAddress.addClass("hide");
geoCoder.setCity(city);
geoCoder.getLocation(address);
}
else{
fnShowMessage($msgAddress, '咋还没输入地址就定位了呢?');
}
},
nameSearch, clickLocateListener,
$sugNameList = $("#sugNameList").on("click", function(e){
$txtName[0].value = e.target.innerHTML;
$sugNameList.addClass("hide");
}),
fnNameSeachEvent = function(e){
if(e.tips && e.tips.length){
for(var tips = e.tips, i = 0, len = tips.length, html= ""; i < len; i++){
html = html + '<a href="javascript:;">'+ tips[i].name + '</a>';
}
$sugNameList.html(html).removeClass("hide")
}
else{ $sugNameList.addClass("hide"); }
},
$txtName = $("#txtName").on("keydown keyup paste", function(e){
var val = $.trim($txtName[0].value);
if(val){
nameSearch.search(val);
}
});
$("#aLocateToMap").on("click", fnGoSearch);
//点击地图,定位 marker 点;该功能不需要
$("document").ready(function(){
var $msgName = $("#msgName");
if(clickLocateListener){ AMap.event.removeListener(clickLocateListener); }
AMap.event.addListener(mapObj, "click", function(e){
if(marker){ marker.setMap(null); marker = null;}
if(infoWindow){ infoWindow.close();}
marker = new AMap.Marker({map: mapObj, position: e.lnglat, offset: new AMap.Pixel(-10,-34),
content:'<img style="width:32px;height:34px;z-index:300;" src="http://webapi.amap.com/images/marker_sprite.png" />'});
geoCoder.getAddress(e.lnglat);
//获取点之后的经纬度
// console.log(e.lnglat)
});
});
mapObj = new AMap.Map("mapInst",{ resizeEnable: true });
mapObj.plugin(["AMap.ToolBar", "AMap.Geocoder","AMap.Autocomplete"], function(){
mapObj.addControl(new AMap.ToolBar({ruler: false, direction: false}));
geoCoder = new AMap.Geocoder;
AMap.event.addListener(geoCoder, "complete", fnGeoCoder);
AMap.event.addListener(geoCoder, "error", fnGeoCoder);
nameSearch = new AMap.Autocomplete;
AMap.event.addListener(nameSearch, "complete", fnNameSeachEvent);
AMap.event.addListener(nameSearch, "error", fnNameSeachEvent);
});
}(jQuery);
</script>
</div><!-- /.main_content -->
</div><!-- #page -->
<!--[if !IE]><!-->
<script type="text/javascript" src="http://lbs.amap.com/wp-content/themes/apiwebsite/js/syntaxhighlighter_3.0.83/scripts/shMain.js"></script>
<script type="text/javascript">SyntaxHighlighter.all();</script>
<!--<![endif]-->
<script src="http://lbs.amap.com/wp-content/themes/apiwebsite/js/header.js?t=20150918" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="http://lbs.amap.com/wp-content/themes/apiwebsite/js/jquery.cookie.js"></script>
<script type="text/javascript" src="http://lbs.amap.com/wp-content/themes/apiwebsite/js/date.js"></script>
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1255621432'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "w.cnzz.com/q_stat.php%3Fid%3D1255621432' type='text/javascript'%3E%3C/script%3E"));</script>
</body>
</html>

声明:此文系舞林cuznwww.wulinlw.org)原创稿件,转载请保留版权

【Yii2 高级版】 使用中记录

Continue Read..

持续记录~~~

1.跳转

yii2 单web         echo $this->redirect ( "/login/logout" ); die;

yii2 高级            return   Yii::$app->getResponse()->redirect("/login/logout");

 

1.根地址

yii2 高级           Yii::$app->getHomeUrl()

 

声明:此文系舞林cuznwww.wulinlw.org)原创稿件,转载请保留版权