mercredi 23 décembre 2020

HTML - Don't let the User leave the page?

window.onbeforeunload = function() {
   return "Dont leave me";
   return;
}; 

So thats my HTML-Code(JavaScript) so far and its working. Now there will be a pop up if you try to leave. Is there any oppertunity to loop the user in this pop-Up when he clicks on leaving?




Aucun commentaire:

Enregistrer un commentaire