douzhaishan5462
2012-01-16 22:33
浏览 50
已采纳

如何将目标属性添加到锚标签以在新选项卡或窗口中打开超链接?

I have the code below to make part of my rss feed a hyperlink but how to i change this to make the link open in a new tab or a new window.

print "<a href=\"$this->link\">";

I tried adding target="_blank"but was not sure how to add it.

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • dreamact3026 2012-01-16 22:36
    已采纳
    print "<a href=\"$this->link\" target=\"_blank\">";
    
    打赏 评论
  • dousheng3364 2012-01-16 22:37
    print "<a href='$this->link' target='_blank'>";   
    
    打赏 评论

相关推荐 更多相似问题