//点击按钮后弹出modal窗口 function test() { var times = document.getElementById('times').value; //document.forms[0].target = "_blank"; //document.forms[0].action = "<%=request.getContextPath()%>/test1/test.jsp?times="+times; //document.forms[0].method = "post"; //document.forms[0].submit(); //以下为modalDialog窗口的提交方式等同于上面的提交 showModalDialog("<%=request.getContextPath()%>/test1/test.jsp?times="+times, "newwindow", "dialogwidth:30; dialoghight:35"); }