function IsPC() { var userAgentInfo = navigator.userAgent; var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]; var flag = true; for (var v = 0; v < Agents.length; v++) { if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break;}} return flag;} function gotoWap() { var a = window.location.href; if(a.charAt(a.length-1)=="/") { a += "index.html" } if( a.indexOf(".html") > 0 && a.indexOf("_m.html") < 0 ) { window.location = a.replace(".html", "_m.html") } } if(!IsPC())gotoWap();