isIphone = navigator.appVersion.toLowerCase().indexOf("iphone") >= 0;if (isAndroid){window.location.href = 手机网站地址;}if (isIphone){window.location.href = 手机网站地址;}上面这个是放在电脑网站的。只对某些手机系统有效 这个是放在手机网站的,只对IE内核的浏览器有效,火狐无效