标签:cal code navig com 判断 phone win nav ring
如何判读打开的是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
}
标签:cal code navig com 判断 phone win nav ring
原文地址:https://www.cnblogs.com/youran/p/9361770.html