先用window.open打开个窗口加一个target,然后form也加一个同样的target
Form页面,form.html
<script language="javascript">
function go(){
var fm = document.forms[0];
window.open ('about:blank','newwindow','height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no') ;
fm.action="windows.html";
fm.target="newwindow";
fm.submit();
}
</script>
<form name="testfm" method="get" action="" target="_ddd">
<input type="text" name="testVal" value="333">
<input type="button" value="test" onClick="go();">
</form>
窗口页面,windows.html
<script language="javascript">
document.write(window.location);
</script>