jq PC端跳转手机端

<script type="text/javascript">
function loadBrowser() {
var userAgent = navigator.userAgent.toLocaleLowerCase();
//debugger;
if ((userAgent.match(/(mqqbrowser|juc|fennec|symbian|windows phone|android|blackberry|webos|browserng|iemobile|wosbrowser|iphone)/i))) {
return "mobile"

}
if (loadBrowser() == 'mobile'){
window.location.href = "mobile.html";
}
</script>

猜你喜欢

转载自blog.csdn.net/m0_37412958/article/details/80088906
jq