Javascript examples for DOM Event:onabort
The onabort event occurs when the user aborts the loading of an <img> or <input type="image"> element.
Bubbles | Yes |
---|---|
Cancelable | No |
Supported HTML tags: | <img> and <input type="image"> |
Execute a JavaScript if loading of an image is aborted:
<!DOCTYPE html> <html> <body> <image src='http://java2s.com/resources/a.png' onabort="myFunction()"/> <script> function myFunction() {/*from ww w . j ava2 s . c om*/ console.log("abort"); } </script> </body> </html>