To open a windown in javascript:
var w = window.open("","","width=500, height=80"); w.document.write("EndMemo.com javascript Tutorial");
var w = window.open("","","width=500, height=80"); w.document.write("EndMemo.com javascript Tutorial"); w.close();
Although the open window has a close button on the up right corner.
If no open window is specified, by default it will close current web page:
window.close();
However, in firefox, if current page is not opened by javascript, it will not close it.