js判断客户端是IPAD和iphone
function checkIsIphoneIpad()
{
var pda_user_agent_list = new Array("iPhone", "iPod", "iPad"/*, "GTB"*/);
var pda_app_name_list = new Array("Microsoft Pocket Internet Explorer");
var user_agent = navigator.userAgent.toString();
for (var i=0; i
return true;
}
}
var appName = navigator.appName.toString();
for (var i=0; i
return true;
}
}
return false;
}
JS判断移动设备函数
function checkMobile()
{
var pda_user_agent_list = new Array("2.0 MMP", "240320", "AvantGo","BlackBerry", "Blazer",
"Cellphone", "Danger", "DoCoMo", "Elaine/3.0", "EudoraWeb", "hiptop", "IEMobile", "KYOCERA/WX310K", "LG/U990",
"MIDP-2.0", "MMEF20", "MOT-V", "NetFront", "Newt", "Nintendo Wii", "Nitro", "Nokia",
"Opera Mini", "Opera Mobi",
"Palm", "Playstation Portable", "portalmmm", "Proxinet", "ProxiNet",
"SHARP-TQ-GX10", "Small", "SonyEricsson", "Symbian OS", "SymbianOS", "TS21i-10", "UP.Browser", "UP.Link",
"Windows CE", "WinWAP", "Android", "iPhone", "iPod", "iPad", "Windows Phone", "HTC"/*, "GTB"*/);
var pda_app_name_list = new Array("Microsoft Pocket Internet Explorer");
var user_agent = navigator.userAgent.toString();
for (var i=0; i
return true;
}
}
var appName = navigator.appName.toString();
for (var i=0; i
return true;
}
}
return false;
}
本文来源于WEB开发笔记 http://www.chhua.com