修改跳转页面的href设置方式
This commit is contained in:
parent
7d3d28d2c6
commit
aa797a0347
@ -35,7 +35,8 @@
|
||||
// if current devices is mobile, redirect url1, else redirect url2
|
||||
if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
|
||||
url = urlMobile
|
||||
document.getElementById('href').attr('href', url)
|
||||
console.log(url)
|
||||
document.getElementById('href').setAttribute('href', url)
|
||||
} else {
|
||||
location.href = url
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user