//判断浏览器方法 | |
function get_userbrowser(){ | |
var this_userAgent=navigator.userAgent; | |
var keywords=new Array("Android", "iPhone", "iPod", "iPad", "Windows Phone", "MQQBrowser","Firefox","Safari","Opera"); | |
var keywords_leng=keywords.length; | |
for(i=0;i<keywords_leng;i++){ | |
if(this_userAgent.indexOf(keywords[i])!=-1){ | |
return keywords[i]; | |
break; | |
} | |
} | |
} | |
var i_browser=get_userbrowser(); | |
/*if(i_browser=="Android"||i_browser=="iPhone"||i_browser=="iPod"||i_browser=="iPad" || i_browser=="Windows Phone"){ | |
// 判断是否是 移动设备访问 然后跳转到 http://m.huasongauto.com.cn/mobile/ | |
window.location.href = ‘http://m.huasongauto.com.cn/mobile/‘; | |
}*/ | |
时间: 2024-10-10 07:58:20