Tag:class lin no mobile terminal baidu ios cas htm cti
Var browser={ versions:function () { var u = navigator.userAgent, app = navigator.appVersion; return {//Mobile Terminal browser version information trident: u.indexof (' trident ') > -1, //ie kernel presto: u.indexof (' presto ') > -1, //opera kernel webkit: u.indexof (' AppleWebKit ') > -1, //Apple, Google kernel gecko: u.indexof (' Gecko ') > -1 && u.indexof (' khtml ') == -1, //Firefox kernel mobile: !! U.match (/applewebkit.*mobile.*/), //is the mobile terminal          IOS:&Nbsp;!! U.match (/\ (i[^;] +;( U;) cpu.+mac os x/), //ios terminal android: u.indexof (' android ') > -1 | | u.indexof (' Linux ') > -1, //android terminal or UC browser iphone: u.indexof (' iphone ') > -1 , //whether for iphone or Qqhd browser ipad: u.indexof (' IPad ') > -1, //whether ipad webapp: u.indexof (' Safari ') == -1 //whether the web should program, no head with bottom }; } (), language: (navigator.browserlanguage | | navigator.language). toLowerCase () } if ( browser.versions.mobile | | browser.versions.ios | | browser.versions.android | | browser.versions.iphone | | browser.versions.ipad) { window.location = "http ://m.baidu.com "; }
JS to determine whether the mobile or the PC-side