www.gusucode.com > (带手机版数据同步)汽车租赁汽车改装公司网站源码 汽车销售汽车维修4S店模版(demo409)源码程序 > (带手机版数据同步)汽车租赁汽车改装公司网站源码 汽车销售汽车维修4S店模版(demo409)源码程序/www3/style/js/urlredirect.js
// JavaScript Document function urlredirect() { var sUserAgent = navigator.userAgent.toLowerCase(); if ((sUserAgent.match(/(ipod|iphone os|midp|ucweb|android|windows ce|windows mobile)/i))) { // 只适用盘古建站,PC跳转移动端 var thisUrl = window.location.href; window.location.href = thisUrl.substr(0,thisUrl.lastIndexOf('/')+1)+'wap/'; } } urlredirect();