1
为什么这个链接在Safari上不起作用? 当我点击Click here
它应该打开http://othersite.com
和http://mysite.com/profile
。问题是它只会打开http://mysite.com/profile
并且它不会为http://othersite.com
打开一个新选项卡。这一个适用于Chrome和firefox ..我可以使它在Safari上工作吗?带onclick的href在Safari中不工作
HTML
<a target="_blank" onclick="redirect()" href="http://othersite.com">Click here</a>
的JavaScript
function redirect(){
location.href = 'http://mysite.com/profile';
}
这甚至没有接近回答这个问题。另外它不起作用。 – DirtyKalb