DHTML/Javascript

이 페이지에서 벗어나시겠습니까? 이벤트

tornado 2013. 9. 30. 08:52

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

 <head>

  <title> New Document </title>

  <meta name="Generator" content="EditPlus">

  <meta name="Author" content="">

  <meta name="Keywords" content="">

  <meta name="Description" content="">

  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

<script type="text/javascript">


$(window).on('beforeunload', function(){

        return "This should create a pop-up";

    });

    </script>

 </head>


 <body>

  Windows Close Event Catch Test..

 </body>

</html>