function isWeiXin() { var ua = window.navigator.userAgent.toLowerCase(); if (ua.match(/MicroMessenger/i) == 'micromessenger') { return true; } else { return false; } } jQuery(function () { jQuery("strong").bind("taphold", tapholdHandler); function tapholdHandler(event) { var this_id=$(this).attr('id'); CP(this_id); } }); function getCookie(name) { try{ var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); if(arr=document.cookie.match(reg)) return unescape(arr[2]); else return null; }catch(e){} } function GetComUrl() { var lastUrl = ''; //来源url----------------------- if (document.referrer.length > 0) { lastUrl = document.referrer; } try { if (lastUrl.length == 0 && opener.location.href.length > 0) { lastUrl = opener.location.href; } } catch (e) { lastUrl = window.location.href; } return lastUrl; } function UrlSearch() { var name,value; var str=location.href; //取得整个地址栏 var num=str.indexOf("?") str=str.substr(num+1); //取得所有参数 stringvar.substr(start [, length ] var arr=str.split("&"); //各个参数放到数组里 for(var i=0;i < arr.length;i++){ num=arr[i].indexOf("="); if(num>0){ name=arr[i].substring(0,num); value=arr[i].substr(num+1); this[name]=value; } } }