前端JS判断页面是在pc端仍是移动端打开方法

同一个域名:须要在PC端和移动端显示不一样的项目,新建一个第三方项目,里面就放一个页面,js里面写一个页面加载事件,以下:web window.location.href = /Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent) ? "https://www.baidu.com/" :  "http://news.bai
相关文章
相关标签/搜索