1.打开一个新窗口:window.open();为了便于父窗口操作子窗口可以为window.open()定义一个变量,例如:
var opW = window.open(‘tests.html’,'popup’,'width=300,height=300′);

这样要关闭子窗口可直接使用:opW.close();

要操作子窗口元素,例如:
opW.document.getElementById(“fartherWindowTxt”).innerHTML = “操作子窗口”;

2.子窗口可以使用window.opener来引用父窗口:window.opener.document.getElementById(“fartherWindowTxt”).innerHTML=”子窗口操作父窗口!”;

3.窗口关闭自身窗口可以使用:window.close();

点击查看demo:http://www.css88.com/demo/window-tongxin/