< >

beforeunload.php


Quell Code


<!doctype html>
<html lang="de">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
<h3>Schliesse das fenster jetzt</h3>
<script>
$(document).ready(function()  {
  $(window).bind('beforeunload', function()  {
    return 'Seite wirklich verlassen?'; 
  });
});
</script>

</body>
</html>