根据请求头跳转判断Android&iOS

if(navigator.userAgent.match(/Android/i)) { 
	window.location = 'http://apk.hiapk.com/m/downloads?id=com.shixun.sunwaykids&vcode=6'; 
} 


if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) || (navigator.userAgent.indexOf('iPad') != -1)) { 
		document.location = "https://itunes.apple.com/us/app/shang-hui-you-er-yuan/id725215705?mt=8"; 
} 

 

posted @ 2013-12-16 14:18  GreyWolf  阅读(450)  评论(0编辑  收藏  举报