<!DOCTYPE html>
<html>
<head>
<title>MyHtml.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
</head>
<script src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(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");
//转载注明www.chhua.com
var user_agent = navigator.userAgent.toString();
for ( var i = 0; i < pda_user_agent_list.length; i++) {
if (user_agent.indexOf(pda_user_agent_list[i]) >= 0) {
alert("------------手机");
return true;
}
}
var appName = navigator.appName.toString();
for ( var i = 0; i < pda_app_name_list.length; i++) {
if (user_agent.indexOf(pda_app_name_list[i]) >= 0) {
alert("----------------------");
return true;
}
}
return false;
});
</script>
<body>
This is my HTML page. <br>
</body>
</html>