From aa797a03474bb25b42e4234be141ff0973658527 Mon Sep 17 00:00:00 2001 From: zhl Date: Mon, 17 Apr 2023 11:29:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=B3=E8=BD=AC=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=9A=84href=E8=AE=BE=E7=BD=AE=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/redirect_page.ejs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/redirect_page.ejs b/templates/redirect_page.ejs index 69f5cfb..caaf70e 100644 --- a/templates/redirect_page.ejs +++ b/templates/redirect_page.ejs @@ -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 }