打开新窗口
window.open("xxx.jsp","newwindow", "height=400, width=650, top=200,left=200,toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no");
刷新父页面
window.opener.location.reload();
关闭本窗口
window.close();
本文介绍了如何使用JavaScript进行网页窗口的基本操作,包括打开新窗口、刷新父页面及关闭当前窗口的方法。通过具体代码示例,读者可以了解到window.open、window.opener.location.reload及window.close等API的具体用法。
打开新窗口
window.open("xxx.jsp","newwindow", "height=400, width=650, top=200,left=200,toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no");
刷新父页面
window.opener.location.reload();
关闭本窗口
window.close();

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