当进度由于预定时间到期而终止时,会触发timeout
事件。
示例
var client = new XMLHttpRequest()
client.open("GET", "http://www.example.org/example.txt")
client.ontimeout = function(e) {
console.error("Timeout!!")
}
client.send()
继承
timeout
事件实现了 ProgressEvent
接口,它继承自 Event
— 它拥有在这个接口上定义的属性和方法。
规范
浏览器兼容性
Feature |
Chrome |
Edge |
Firefox (Gecko) |
Internet Explorer |
Opera |
Safari |
Basic support |
1.0 |
(Yes) |
3.5 (1.9.1) |
10.0 |
(Yes) |
(Yes) |
Feature |
Android |
Android Webview |
Edge |
Firefox Mobile (Gecko) |
IE Mobile |
Opera Mobile |
Safari Mobile |
Chrome for Android |
Basic support |
(Yes) |
(Yes) |
(Yes) |
1.0 (1.9.1) |
10.0 |
(Yes) |
(Yes) |
(Yes) |
相关链接
文档标签和贡献者