How to use HTML DOM Image onabort in JavaScript

In this article i am going to explain about HTML DOM image onabort event.
  • 1976

HTML DOM image onabort event

The HTMl  DOM onabort event occur
at a time of loading of an image is aborted.

Syntax of image onabort event

onabort="Code of JavaScript"


Browser support

The image onabort event  is supported in all major browser.

Example of image  onabort event

<html>

<head>

<script type="text/javascript">

    function abortImage() {

        alert('Error: Loading of the image was aborted!')

    }

</script>

</head>

 

<body>

<img src="D:\\a1\\onabort.jpg" onabort="abortImage()" />

</body>

</html>

Output:

onabort new image.jpg

You may also want to read these related articles :here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.