<SCRIPT LANGUAGE="JavaScript">
function mobile_device_detect(url)
{
var thisOS=navigator.platform;
var os=new Array("iPhone","iPod","iPad","android","Nokia","SymbianOS","Symbian","Windows Phone","Phone","Linux armv71","MAUI","UNTRUSTED/1.0","Windows CE","BlackBerry","IEMobile");
for(var i=0;i<os.length;i++)
{
if(thisOS.match(os[i]))
{
window.location=url;
}
}
//因为相当部门的手机系统不知道信息,这里是做姑且性非凡辨认
if(navigator.platform.indexOf('iPad') != -1)
{
window.location=url;
}
//做这一部门是因为Android手机的内核也是Linux
//可是navigator.platform显示信息不尽沟通环境繁多,因此从欣赏器下手,即用navigator.appVersion信息做判定
var check = navigator.appVersion;
if( check.match(/linux/i) )
{
//X11是UC欣赏器的平台 ,假如有其他非凡欣赏器也可以附加上条件
if(check.match(/mobile/i) || check.match(/X11/i))
{
window.location=url;
}
}
//类in_array函数
Array.prototype.in_array = function(e)
{