标签:
这是以前在网上搜的js方法,已经不清楚在哪找的啦,可以自动跳转到手机版网页。
<script type="text/javascript">
var mobileAgent = new Array("iphone", "ipod", "ipad", "android", "mobile", "blackberry", "webos", "incognito", "webmate", "bada", "nokia", "lg", "ucweb", "skyfire");
var browser = navigator.userAgent.toLowerCase();
var isMobile = false;
for (var i = 0; i < mobileAgent.length; i++) {
if (browser.indexOf(mobileAgent[i]) != -1) {
isMobile = true;
location.href = ‘http://192.168.1.113:8012/LogIn2.aspx‘; break;
}
}
</script>
标签:
原文地址:http://www.cnblogs.com/201608chen/p/5718910.html