js判断pc仍是移动端

var pcyidong =/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent);浏览器

若是pcyidong的值为false则用户的浏览器为pc端test

若是pcyidong的值为true则用户浏览器为移动端移动

if (pcyidong == false) {vi

    alert('这是pc端')navigator

}

相关文章
相关标签/搜索