与目标=“_blank"的链接无法在 Chrome 的新标签页中打开 [英] link with target="_blank" does not open in new tab in Chrome
本文介绍了与目标=“_blank"的链接无法在 Chrome 的新标签页中打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在本网站上,顶部的手风琴导航包含一个名为Foundation"的元素:(截图).
On this website, the top accordion navigation contains an element called "Foundation": (screenshot).
此元素由 HTML 代码生成:
This element is produced by HTML code:
<a href="http://www.foracure.org.au" target="_blank" style="width: 105px;"></a>
但是,在 Chrome 中,当您单击此元素时,新网站不会在新标签页中打开.
However, in Chrome, when you click on this element, the new website does not open in a new tab.
你能告诉我为什么吗?谢谢.
Can you please tell me why? Thank you.
推荐答案
Replace
<a href="http://www.foracure.org.au" target="_blank"></a>
with
<a href="#" onclick='window.open("http://www.foracure.org.au");return false;'></a>
在您的代码中,并将在 Chrome 和其他浏览器中运行.
in your code and will work in Chrome and other browsers.
谢谢阿努拉格
这篇关于与目标=“_blank"的链接无法在 Chrome 的新标签页中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文