如何在 Vue js 项目中使用 'a' 标签重定向到另一个域上的页面?

How to redirect to the page on another domain with 'a' tag in Vue js project?

我有一个普通的 link 到另一个页面 HTML:

<a href='facebook.com'>

<a href='www.facebook.com'>

当我点击它时,它会将我重定向到:

my-domen.dev/facebook.com

如何正确重定向到另一个域上的页面?

如果您尝试加载外部 URL,则需要指定协议。

<p>Right click and open links in a new tab.</p>
<a href="facebook.com">Internal - Will throw 404 - facebook.com</a><br>
<a href="www.facebook.com">Internal - Will throw 404 - www.facebook.com</a><br>
<a href="https://facebook.com">External - https://facebook.com</a><br>

您可以在此处阅读更多相关信息: