如何判读打开的是pc端和移动端 分别加载不同的html
let ua = window.navigator.userAgent.toLocaleLowerCase()
let murl ="//m.jd.com"
let reg =/iphone|android|symbianos|windows\sphone/g if (reg .test(ua )) { window.location.href = murl }
转载于:https://www.cnblogs.com/youran/p/9361770.html