HTML:如何强制链接在新标签页中打开,而不是新窗口 [英] HTML: how to force links to open in a new tab, not new window

查看:1016
本文介绍了HTML:如何强制链接在新标签页中打开,而不是新窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 target =_ blank在新标签页中打开链接...但在IE中打开一个新窗口是完全合乎逻辑的, code> _blank 应该做,我不知道如何 target =_ blank行为在其他浏览器...有什么强制链接在新标签中打开..如果浏览器支持标签页... else make a new window

i use target="_blank" to open links in a new tab... but in IE it opens a new window which is completely logical because that is what _blank is supposed to do and i don't know how target="_blank" behaves in other browsers... is there something to force links to open in a new tab.. if the browser supports tabs... else make a new window

推荐答案

没有办法作为浏览器呈现的HTML的作者。至少还没有我知道。它几乎完全取决于用户自己设置的浏览器及其设置/首选项。

There is no way to do that as the author of the HTML that a browser renders. At least not yet that I know of. Its pretty much up to the browser and its settings / preferences that are set by users themselves.

此外,您不应将此强加于任何用户。浏览器是用户的属性。如果用户想要打开标签页或新窗口中的所有链接,那么让用户做到这一点。

Also, you shouldn't impose this upon any user. A browser is the user's property. If a user wants to open all links in tabs or in new windows, then let the user do exactly that.

很好,我们不能做某些事情。 target = _blank 仍被滥用,弹出式窗口已完成死亡。

It's good that we can't do certain things. target=_blank is still abused and popups have been done to death.

这篇关于HTML:如何强制链接在新标签页中打开,而不是新窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆