Handler document on abort event in JavaScript

Description

The following code shows how to handler document on abort event.

Example


<html>
<body>
<script language = "JavaScript">
function handleAbort(evnt){<!--from w  w  w.j  a v a 2 s.co m-->
alert("An ABORT event has occurred.");
return true;
}
document.onabort = handleAbort;
</script>
</body>
</html>

Click to view the demo

The code above generates the following result.

Handler document on abort event in JavaScript
Home »
  Javascript Tutorial »
    Event »
      Browser Event
Javascript Tutorial Browser Event
Access window event in JavaScript
Add event handler for body onload event in ...
Add event handler for window on load event ...
Add onload event handler by using attribute...
Cancel event with preventDefault in JavaScr...
Filter click event to capture in JavaScript
Filter event to catch in JavaScript
Handle Error event on body in JavaScript
Handle browser window resize event in JavaS...
Handle document on changed event in JavaScr...
Handler document on abort event in JavaScri...