I want to submit my form on browser close event, but I don't get that
event I was trying with the following code but its not working as expected. I want to save all the stuff from the form on window close without window.close event
.
window.bind('beforeunload', function() {
$("#submit").click();
});
<form action="" method="post">
<input type="text" id="checking" name="checking">
<input type="submit" name="submit">
</form>
</div>