To close a window using Javascript, put "window.close()" in an event. See the example below:
<input type=button value="Close" onClick="window.close();">
Category: Javascript