手机访问网页地址跳转手机站代码
手机访问网页地址跳转手机站代码
以下代码放到<head>下面一行!
<script type="text/javascript">
var strURL=window.location.href;
var str_t=parseInt(strURL.split("?")[1]);
var iphoneUrl = "http://wap.qq.com";
if(/iphone|nokia|sony|ericsson|mot|samsung|sgh|lg|philips|panasonic|alcatel|lenovo|cldc|midp|wap|android|iPod/i.test(navigator.userAgent.toLowerCase())){
document.location.href = iphoneUrl;
}
</script>