js判断是手机访问还是电脑访问
var url = patt1.exec(location.href); if (navigator.userAgent.toLowerCase().indexOf("micromessenger") > -1) { window.location.href = "http://www.360doc26.net/wxarticlenew/" + url.toString().split("_")[1] + ".html"; } else if (navigator.userAgent.indexOf("iPhone") > 0 || navigator.userAgent.indexOf("Android") > 0 || navigator.userAgent.indexOf("iPod") > 0) { //手机端跳转 if (url != "") { self.location = "http://www.360doc.cn/article/" + url + ".html"; } }