2
Is there any way to check if the person’s mouse is going to close the site? With Javascript, etc... In the simplest case:
if(estaindofechar){
alert("Tem certeza?");
}
2
Is there any way to check if the person’s mouse is going to close the site? With Javascript, etc... In the simplest case:
if(estaindofechar){
alert("Tem certeza?");
}
5
This is the method called when the user tries to exit the page
window.onbeforeunload = function(e) {
return confirm("Você tem certeza que deseja fechar a página?");
};
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.
Thanks Luks, but is there any way in the script to identify if the mouse is almost getting close to where the button to close the la tab? I’ve seen that function but I don’t know how it’s done...
– Lucas de Carvalho
In this case you have to implement a little more JS by identifying the point where the cursor is on the screen
– LuKs Sys