It may be needed that you need to give a close link in the popup you created. The
window.close () method could be used to close a window.
However, there are certain security restrictions for using the
If you have the reference to a window, you can use the reference to the window to close.
popup_window = window.open(""); ..... popup_window.close ();
You can close the current window using
<a href="self.close ()">Close this Window</a>
Sample Code for window.close()
See the code above in work in the Link below.
Click on the ‘Open Popup window’ link to open the popup first and then click on the ‘Close the Popup window’ link to close the popup.