摘要
一个中断事件的事件处理器发送到window全局对象。(Firefox 2 和Safari不可用)
TODO 要定义什么是“abort”。通过窗口管理关掉窗口么?停止页面的加载?有什么意图和理由(用户,网络或服务器)?在哪一步被发起或被捕获?对于IE浏览器,onabort只可用于img
标签。
语法
window.onabort =funcRef
funcRef
是一个函数引用
例子
window.onabort = function() {
alert("Load aborted.");
}
规范
Specification | Status | Comment |
---|---|---|
HTML Living Standard onabort |
Living Standard |
浏览器兼容性
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | (Yes) | ? | ? | ? | ? |
Feature | Android | Android Webview | Chrome for Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|---|
Basic support | ? | (Yes) | (Yes) | ? | ? | ? | ? | ? |