We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

当进度由于预定时间到期而终止时,会触发timeout 事件。

冒泡
可取消
目标对象 XMLHttpRequest
接口 ProgressEvent

示例

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 — 它拥有在这个接口上定义的属性和方法。

规范

Specification Status Comment
XMLHttpRequest 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 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)

相关链接

文档标签和贡献者

此页面的贡献者: kameii
最后编辑者: kameii,