在父窗口寫:
復制代碼 代碼如下:
var sonid = window.open ('"
+ url2 + "', 'newwindow', 'height=108, width=200, top="
+ top + ",left=" + left
+ ", toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, "
+ "status=no,titlebar=no,z-look=1,depended=yes,alwaysRaised=yes')
window.attachEvent("onunload", closeSonwin);
function closeSonwin()
{
sonid.close();
}