很多时候需要在父页面提交表单,将结果返回到子页面

直接写js:

var newWin;

if(newWin==null){

newWin = window.open("","newwin","height=500px,width=900px,top=50px,left=250px");

}else if(newWin.closed==true){

newWin = window.open("","newwin","height=500px,width=900px,top=50px,left=250px");

}

var form = document.getElementById("form");

form.action="submit.do";

form.target = newWin.name;

form.submit();

newWin.focus();