½â¾ö·½°¸Ò»
<script type="text/javascript">
//ÅжÏÊÇ·ñÒƶ¯¶Ë·ÃÎÊ
browserRedirect();
function browserRedirect() {
var sUserAgent = navigator.userAgent.toLowerCase();
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
var bIsMidp = sUserAgent.match(/midp/i) == "midp";
var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
var bIsAndroid = sUserAgent.match(/android/i) == "android";
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
//window.location.href = "http://gz.gzwhir.com/jpcg201409177619/index.aspx";
}
}
</script>
½â¾ö·½°¸¶þ
<script src="http://siteapp.baidu.com/static/webappservice/uaredirect.js" type="text/javascript"></script>
<script type="text/javascript">uaredirect("ÄãµÄÊÖ»ú°æÍøÖ·");</script>
½â¾ö·½°¸Èý
<script type="text/javascript">
//ƽ̨¡¢É豸ºÍ²Ù×÷ϵͳ
var system = {
win: false,
mac: false,
xll: false,
ipad:false
};
//¼ì²âƽ̨
var p = navigator.platform;
system.win = p.indexOf("Win") == 0;
system.mac = p.indexOf("Mac") == 0;
system.x11 = (p == "X11") || (p.indexOf("Linux") == 0);
system.ipad = (navigator.userAgent.match(/iPad/i) != null)?true:false;
//ÌøתÓï¾ä£¬Èç¹ûÊÇÊÖ»ú·ÃÎʾÍ×Ô¶¯Ìøתµ½wap.baidu.comÒ³Ãæ
if (system.win || system.mac || system.xll||system.ipad) {
} else {
window.location.href = "http://www.jdpatro.com/3g/";
}
</script>
½â¾ö·½°¸ËÄ£ºÌÚѶÍøµÄÊÊÅä´úÂë
<script type="text/javascript">
if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){
if(window.location.href.indexOf("?mobile")<0){
try{
if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){
window.location.href="http://shipei.qq.com/index.htm";
}else if(/iPad/i.test(navigator.userAgent)){
}else{
window.location.href="http://shipei.qq.com/simple/s/index/"
}
}catch(e){}
}
}
</script>
½â¾ö·½°¸Îå
<script type="text/javascript">
var browser = {
versions : function() {
var u = navigator.userAgent, app = navigator.appVersion;
return {//Òƶ¯ÖÕ¶Ëä¯ÀÀÆ÷°æ±¾ÐÅÏ¢
trident : u.indexOf('Trident') > -1, //IEÄÚºË
presto : u.indexOf('Presto') > -1, //operaÄÚºË
webKit : u.indexOf('AppleWebKit') > -1, //Æ»¹û¡¢¹È¸èÄÚºË
gecko : u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //»ðºüÄÚºË
mobile : !!u.match(/AppleWebKit.*Mobile.*/)
|| !!u.match(/AppleWebKit/), //ÊÇ·ñΪÒƶ¯ÖÕ¶Ë
ios : !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //iosÖÕ¶Ë
android : u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //androidÖն˻òÕßucä¯ÀÀÆ÷
iPhone : u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //ÊÇ·ñΪiPhone»òÕßQQHDä¯ÀÀÆ÷
iPad: u.indexOf('iPad') > -1, //ÊÇ·ñiPad
webApp : u.indexOf('Safari') == -1,//ÊÇ·ñwebÓ¦¸Ã³ÌÐò£¬Ã»ÓÐÍ·²¿Óëµ×²¿
google:u.indexOf('Chrome')>-1
};
}(),
language : (navigator.browserLanguage || navigator.language).toLowerCase()
}
document.writeln("ÓïÑÔ°æ±¾: "+browser.language);
document.writeln(" ÊÇ·ñΪÒƶ¯ÖÕ¶Ë: "+browser.versions.mobile);
</script>