getBMachineType = function(){ var type = 'pc'; var u = navigator.userAgent.toLowerCase(); if(u.indexOf('mobile') > -1){ type = 'mobile'; }else if(u.indexOf('iphone') > -1){ type = 'mobile'; }else if(u.indexOf('ipad') > -1){ type = 'mobile'; }else if(u.indexOf('phone') > -1){ type = 'mobile'; }else if(u.indexOf('blackberry') > -1){ type = 'mobile'; }else if(u.indexOf('meego') > -1){ type = 'mobile'; }else if(u.indexOf('rim') > -1){ type = 'mobile'; } return type; } if(getBMachineType() == 'mobile') window.location.href = 'mobile.html';
0%
Internet Explorer Not Supported
提交