opener.html
来自「javascript即用即差核心对象手册」· HTML 代码 · 共 16 行
HTML
16 行
<script>
document.write("请确认您提交的信息:<br>");
with(window.opener.document.forms[0])
{
window.document.write("<li>姓名:"+name.value+"</li>");
window.document.write("<li>年龄:"+age.value+"</li>");
window.document.write("<li>地址:"+address.value+"</li>");
window.document.write("<center><input type='button' value='关闭窗口' onclick='closeWindow()'></center>");
}
function closeWindow()
{
window.opener=null;
window.close();
}
</script>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?