Target=_blank don';我不在mozilla和IE工作


Target=_blank don't work in mozilla and IE

我有一个在新选项卡中提交和发布结果的表单,我的代码在Chrome中运行良好,但当我在Mozilla或IE中打开我的页面时,它不起作用,新选项卡也不会打开。

我只想在普通浏览器(mozilla、chrome、IE)的新选项卡中打开表单提交

这是我的代码:

<form enctype="application/x-www-form-urlencoded" action method="post" target="_blank" id="test1">
<input type="text" name="txtUserPrice" id="txtUserPrice" />
        <input type="submit" name="btnSubmitForm" value="Buy" />
</form>

我认为我的问题来自target="_blank",因为在chrome中,它打开了新的选项卡。但其他浏览器(Mozilla和IE)没有。

我该怎么解决这个问题?

还有一个问题:

这个问题是导致不同浏览器呈现或代码解析的原因吗?

这段代码在我的mozilla&IE。我认为客户端需要更新浏览器。。。

这是一个已知的错误Microsoft Internet Explorer

某些版本的MSIE有一个错误,导致使用"_blank"的锚点不起作用。有关修补程序,请参阅"在新窗口中打开"在Internet Explorer中不起作用。

阅读更多:

http://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/intermittent-problems-with-targetblank-in-ie-9/c7e937be-7400-41e9-bf03-14474fbc1832?auth=1

请将_blank替换为blank 进行检查

<form enctype="application/x-www-form-urlencoded" action method="post" target="blank" id="test1">

检查jsfiddle

尝试将target替换为onclick

onclick="window.open('example.php', 'newwindow', 'width=800, height=600'); return false;" 

尝试,将formtarget属性添加到提交按钮:

<form enctype="application/x-www-form-urlencoded" action method="post" target="_blank" id="test1">
    <input type="text" name="txtUserPrice" id="txtUserPrice" />
    <input type="submit" formtarget="_blank" name="btnSubmitForm" value="Buy" />
</form>