1

为什么此链接在 Safari 上不起作用?当我点击Click here它应该打开http://othersite.comhttp://mysite.com/profile。问题是它只打开http://mysite.com/profile,并没有为http://othersite.com. 这个适用于 Chrome 和 firefox ..我怎样才能让它在 Safari 上运行?

html

<a target="_blank" onclick="redirect()" href="http://othersite.com">Click here</a>

javascript

function redirect(){
    location.href = 'http://mysite.com/profile';
}
4

1 回答 1

-3

为了在新选项卡中打开链接,您必须将目标属性设置为_tab_blank根据用户的设置打开一个新选项卡或一个新窗口。

于 2013-10-31T19:19:55.727 回答