YouTip LogoYouTip

Event Onabort

onabort Event

onabort Event

-- What we learn is not only technology, but also dreams!

JavaScript Reference Manual

Overview

JavaScript Objects

Browser Objects

DOM Objects

HTML Objects

Go upHTML DOM Attribute Object

HTML DOM Console ObjectGo up

Deep Dive

  • Scripting Language
  • Programming
  • Software
  • Computer Science
  • Web Design & Development
  • Web Service
  • Web Services
  • Programming Languages
  • Development Tools
  • Scripts

onabort Event

Go up Event Object

Example

Execute JavaScript when an image loading is aborted:

<img src="image_w3default.gif" onabort="myFunction()">

Definition and Usage

The onabort event is triggered when the user aborts the loading of an <img> or <input type="image"> element.


Browser Support

Event
onabort Not Supported Yes Not Supported Not Supported Not Supported

Syntax

In HTML:

<element onabort="myScript">

In JavaScript:

object.onabort = function(){myScript};

In JavaScript, using the addEventListener() method:

object.addEventListener("abort", myScript);

Note: Internet Explorer 8 and earlier IE versions do not support the addEventListener() method.


Technical Details

Bubbles: Yes
Cancelable: No
Event type: If generated on the user interface, it is UIEvent, otherwise it is Event.
Supported HTML tags: All HTML elements, except: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title>

Go up Event Object

← Event OnerrorPhp Intlchar β†’