点击使用localhost网址(www.google.com)打开的锚标记?

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

下面是代码

<a href="www.yahoo.com" target="_blank">Yahoo!</a>

它显示下一页的URL如下

http://99.1.0.39/test/test-2/www.yahoo.com

如何用www.yahoo.com打开新页面?

html
1个回答
0
投票

尝试使用

如果您不确定该协议使用

<a href="//www.yahoo.com" target="_blank">Yahoo!</a>

要么

<a href="https://www.yahoo.com" target="_blank">Yahoo!</a>

要么

<a href="http://www.yahoo.com" target="_blank">Yahoo!</a>
© www.soinside.com 2019 - 2024. All rights reserved.