Home > Article > Web Front-end > Usage example of onabort event of Event object in html DOM_javascript skills
The example in this article describes the usage of the onabort event of the Event object in the DOM of html. Share it with everyone for your reference. The specific analysis is as follows:
The onabort event occurs when image loading is interrupted.
This handler is called when the user abandons loading of the image (such as clicking the stop button) before the image has finished loading.
Syntax:
HTML tags that support this event:
JavaScript objects that support this event:
image
In this example, if the loading of the image is interrupted, a dialog box will be displayed:
I hope this article will be helpful to everyone’s JavaScript programming design.