使用标记的target属性form:
<form action="#" target="_blank"></form>
Run Code Online (Sandbox Code Playgroud)
见:表格.
<script type="text/javascript">
function openwindow (url) {
var win = window.open(url, "window1", "width=600,height=400,status=yes,scrollbars=yes,resizable=yes");
win.focus();
}
</script>
<button value="send" onclick="openwindow('http://google.com')" />
Run Code Online (Sandbox Code Playgroud)
或者你使用target-attribute,就像另一个说的那样.如果要将表单元素的数据传递到操作页面,目标解决方案是更好的选择
请记住,弹出窗口阻止程序可能会阻止此操作