我在网页上有一个超链接,希望在单击时它能自动打开到一个新的标签页,该怎么做?如果不可能实现,我也可以接受在新窗口中打开。
答案: link text语法如下:
<a href="http://www.someurl.com" target="_blank">
这将在新页面或选项卡中打开页面,具体取决于浏览器配置。
添加
target="_blank" in your link.
<head>
<title></title>
<base target="_blank"/>
</head>
CSS3提供了一个target-new属性,您可以指定window | tab | none
:
If a user wanted to have new windows open in new tabs instead, she could use the following user style sheet to do so:
* { target-new: tab ! important }
<asp:HyperLink ID="hplStandard" runat="server" ForeColor="Green"
Font-Bold="True" Target="_blank">Standard Report</asp:HyperLink>
将属性Target设置为_blank
<a target="_blank">
就足够了。 - Curtis