html中会在图像加载被中断时发生的事件onabort

黄舟
Release: 2017-11-07 10:51:44
Original
1889 people have browsed it

定义和用法

onabort 事件会在图像加载被中断时发生。

当用户在图像完成载入之前放弃图像的装载(如单击了 stop 按钮)时,就会调用该句柄。

语法

onabort="SomeJavaScriptCode"
Copy after login
参数描述
SomeJavaScriptCode必需。规定该事件发生时执行的 JavaScript。

支持该事件的 HTML 标签:

Copy after login

支持该事件的 JavaScript 对象

image
Copy after login

实例 1

在本例中,如果图像的加载被中断,则会显示一个对话框:

Copy after login

实例 2

在本例中,如果图像的加载中断,我们将调用一个函数





Copy after login


The above is the detailed content of html中会在图像加载被中断时发生的事件onabort. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!