How to close current tab in a browser window?
You will need Javascript to do this. Use window.close(): close(); Note: the current tab is implied. This is equivalent: window.close(); or you can specify a different window. So: function close_window() { if (confirm(“Close Window?”)) { close(); } } with HTML: <a href=”https://stackoverflow.com/questions/2076299/javascript:close_window();”>close</a> or: <a href=”#” onclick=”close_window();return false;”>close</a> You return false here to prevent the default … Read more