이벤트 이것은 onAbort 이미지
정의 및 사용
이것은 onAbort 이벤트는 이미지 로딩이 중단되어 발생합니다.
문법
onabort="JavaScriptCode"
参数 | 描述 |
---|---|
JavaScriptCode | 必需。规定该事件发生时执行的 JavaScript。 |
브라우저 지원
모든 주요 브라우저 이벤트 이것은 onAbort 지원
예
이미지로드가 중단 된 경우이 예에서, 대화 상자가 나타납니다 :
<html> <meta charset="utf-8"> <title>本教程(w3big.com)</title> <script> function abortImage() { alert('Error: 图像加载终止!') } </script> </head> <body> <img src="image_w3default.gif" onabort="abortImage()"> </body> </html>
이미지 개체