想要在新窗口中打开链接

时间:2011-11-27 20:22:18

标签: html target

为什么不在新窗口中打开?

<a href="http://www.authorsden.com/visit/viewwork.asp?id=49784&AuthorID=157940">
  <img src="authors_den.jpg" target="blank" alt="Authors Den Link"
       width="175px" border="0"/>
</a>

4 个答案:

答案 0 :(得分:4)

你可能意味着“_blank”而不是“空白”,但更大的问题是:

target="_blank"部分应位于<a>标记上,而不是<img>标记。

<a target="blank" href="http://www.authorsden.com/visit/viewwork.asp?id=49784&AuthorID=157940">
    <img src="authors_den.jpg" alt="Authors Den Link" width="175px" border="0"/>
</a>

答案 1 :(得分:2)

目标名为_blank而不是blank。另外,您应该在锚标记a上使用它。

<a target="_blank" alt="Authors Den Link" href="http://www.authorsden.com/visit/viewwork.asp?id=49784&AuthorID=157940">
    <img src="authors_den.jpg" width="175px" border="0"/>
</a>

答案 2 :(得分:2)

只需添加属性

即可
target="_blank"

到你的锚标签

答案 3 :(得分:0)

  

Blockquote $(function(){           $( “A”)ATTR( “目标”, “_空白”)。       });