Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="window.onbeforeunload">
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  
</body>
</html>
 
window.onbeforeunload = function (e) {
//   e.returnValue = "hello, are you sure???";
  return "You may lose the changes!!!\n are you sure???";
//   return null;
};
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
revathskumarpro
0viewers