未分类
有很多时候,我们手机访问pc站会跳到手机站,但是有时候手机想访问pc站,却没有办法,其实很简单,在pc站跳转代码下加入以下代码<scripttype="text/javascript">try{varurlhash=window.location.hash;if(!urlhash.match("fromapp")){if((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i))){window.location="http://wap.ccnucanada.com";}}}catch(err){}</script>在手机站添加链接,到pc站的#fromapp这样pc站就不会往手机站跳转了。