Kindly help me, how can i detect only browser / tab close button event in javascript or jquery. I mean only close button no page refresh and any other menu link opening etc.
I tried this code on onbeforeunload event of javascript
function handleBrowserCloseButton(event) {
if(window.event.clientX < 0 && window.event.clientY <0)
{
alert('Browser close button clicked');
}
}
But unfortunately it did not solved my problem. Kindly help me.