根据请求头跳转判断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"; 

} 

 

你可能感兴趣的:(android)