javascript close window – How to close window using JavaScript?

javascript close window – The close() method closes the current window. also JavaScript provides an in-built function named close() to close the browser window.

javascript close window

window.close();//closes the current browser tab. To close a window or tab that was opened using JavaScript. Windows are opened with window.open(); and Windows are closed with window.close();

How to Close a Window with JavaScript?

javascript close current window
closes the current browser tab

window.close();

javascript close window Example

index.html












Example : close a browser window with HTML code




Don’t Miss : How To Open URL In New Tab Using JavaScript?

I hope you get an idea about javascript close window.
I would like to have feedback on my infinityknow.com.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment