<html>
<body>
<a href = "www.google.com" target = "blank_">google</a>
</body>
<html>
我得到的内容:www.mysite.com/www.google.com
我想要得到的:www.google.com/
最佳答案
您需要在 URL 开头添加 http://
。
<html>
<body>
<a href = "http://www.google.com" target = "blank_">google</a>
</body>
<html>
关于javascript - 尝试链接到外部网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42939073/