如何强制href链接是绝对的?

问题描述 投票:1回答:1

所以,我在Android中有一个混合网络应用程序,我想将我的用户重定向到我的一个Google表单。代码如下所示:

<a href="https://goo(.)gl/forms/..." target="_blank">Text</a>

但每当我点击链接时,我都会收到以下错误:

Application Error
net::ERR_FILE_NOT_FOUND (file:///android_asset/www/%22https://goo(.)gl/forms/...%22)

不知何故,链接是相对于我的应用程序的根目录,我希望它是绝对的。

预先感谢您的帮助。

PS:我把括号放在goo(。)gl URL中,否则我不允许发布URL

javascript android html url href
1个回答
-1
投票

当我们在开始时使用http,https时,链接会自动绝对。我不知道你为什么会收到这个错误。也许你应该在电脑里尝试一下。

© www.soinside.com 2019 - 2024. All rights reserved.