//点击按钮后弹出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"); }
本文介绍了一种使用JavaScript showModalDialog方法实现弹出模态窗口的方法。此方法允许开发者在用户与当前页面交互时阻止其他操作,直到模态对话框被关闭。文中通过具体的示例代码展示了如何设置弹出窗口的URL、尺寸以及其他属性。
4864

被折叠的 条评论
为什么被折叠?



