我有一个“打开”按钮,它“计算”应该在新选项卡中打开的链接。我尝试使用:
window.open(url, '_blank');
但这会打开一个新窗口。
我还尝试了以下方法:
<form id="oform" name="oform" action="" method="post" target="_blank">
</form>
...
document.getElementById("oform").action = url;
document.getElementById("oform").submit();
尽管如此,还是会打开一个新窗口,而不是一个新选项卡。
使用 simple <a href...>
with 时target='blank'
,链接将在新选项卡中打开。
有解决办法吗?