过时
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
An event handler which is called when a pending
XDomainRequest
times out.
xdr.ontimeout = funcRef;
funcRef
A function to be called when the event times out.
var xdr = new XDomainRequest();
xdr.open("POST", "http://example.com/api/method");
xdr.ontimeout = function(){
//Handle timeout
}
xdr.onload = function(){
//Handle Response with xdr.responseText
}
xdr.send("param1=value1¶m2=value2");
Not part of any specification.
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
ontimeout
弃用
非标
|
Chrome No | Edge No | Firefox No | IE 8 — 11 | Opera No | Safari No | WebView Android No | Chrome Android No | Firefox Android No | Opera Android No | Safari iOS No | Samsung Internet Android No |
不支持
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。
XDomainRequest
onerror
onload
onprogress
ontimeout
responseText
timeout