How can close current tab on click button browser window using javascript

Description

Close browser tab on click button using jquery, javascript in PHP. How can close the current browser tab when the user on click button using jquery, javascript in PHP.  How close current browser tab window tab using javascript. I have opened Web page on click link in new tab and submit the form in Mysql and now I want to close current active tab in a browser.

Close current active tab in a browser script code. How to used code Scripts event window.open () and window.close ()when user click close button link and submit.

Close current active tab in a browser script code

 

<a href="javascript:window.open('','_self').close();">close</a>