target="_blank" 中的下划线不再需要了吗?

Is the underscore in target="_blank" no longer needed?

今天我在帮助别人提问时打错了,写了 target="blank" 而不是 target="_blank"。有趣的是它仍然有效。我决定在其他浏览器中也尝试一下,看看是否只有 Chrome 允许 target="blank" 没有下划线,但它似乎也适用于 Firefox 和 Safari。

有没有理由可以删除下划线?如果将其写为 target="blank" 是合法的,为什么即使不是所有消息来源仍然说将其写为 target="_blank"

如果你有 target="blank",打开它两次,它会在同一个 window 中打开。如果您有两次 target="_blank",它会以两个不同的 windows 打开。您可以检查使用:

<a href="http://google.com/" target="blank">Google</a>
<a href="http://en.wikipedia.org/" target="blank">Wikipedia</a>

相同,_blank 以两种不同的方式打开 windows:

<a href="http://google.com/" target="_blank">Google</a>
<a href="http://en.wikipedia.org/" target="_blank">Wikipedia</a>

简单来说就是blank是新window的名字,而_blank特殊关键字[=24] =],打开一个没有名字的新 window。如果我错了,请纠正我。