From 4873c5f1122ac800cf3c916a52df07e05ddc9dcf Mon Sep 17 00:00:00 2001 From: MDN Date: Fri, 11 Feb 2022 00:58:37 +0000 Subject: [CRON] sync translated content --- .../xmlhttprequesteventtarget/onabort/index.html | 56 ------------------- .../xmlhttprequesteventtarget/onerror/index.html | 60 -------------------- .../xmlhttprequesteventtarget/onload/index.html | 54 ------------------ .../onloadstart/index.html | 54 ------------------ .../onprogress/index.html | 64 ---------------------- 5 files changed, 288 deletions(-) delete mode 100644 files/zh-cn/web/api/xmlhttprequesteventtarget/onabort/index.html delete mode 100644 files/zh-cn/web/api/xmlhttprequesteventtarget/onerror/index.html delete mode 100644 files/zh-cn/web/api/xmlhttprequesteventtarget/onload/index.html delete mode 100644 files/zh-cn/web/api/xmlhttprequesteventtarget/onloadstart/index.html delete mode 100644 files/zh-cn/web/api/xmlhttprequesteventtarget/onprogress/index.html (limited to 'files/zh-cn/web/api/xmlhttprequesteventtarget') diff --git a/files/zh-cn/web/api/xmlhttprequesteventtarget/onabort/index.html b/files/zh-cn/web/api/xmlhttprequesteventtarget/onabort/index.html deleted file mode 100644 index 38d305c1c2..0000000000 --- a/files/zh-cn/web/api/xmlhttprequesteventtarget/onabort/index.html +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: XMLHttpRequestEventTarget.onabort -slug: Web/API/XMLHttpRequestEventTarget/onabort -translation_of: Web/API/XMLHttpRequestEventTarget/onabort ---- -
{{APIRef("XMLHttpRequest")}}
- -

XMLHttpRequestEventTarget.onabort 会在 {{domxref("XMLHttpRequest")}} 交易操作被诸如 {{domxref("XMLHttpRequest.abort()")}} 函数中止时调用。

- -

语法

- -
XMLHttpRequest.onabort = callback;
- -

- - - -

示例

- -
var xmlhttp = new XMLHttpRequest(),
-  method = 'GET',
-  url = 'https://developer.mozilla.org/';
-
-xmlhttp.open(method, url, true);
-xmlhttp.onabort = function () {
-  console.log('** 请求被中止');
-};
-xmlhttp.send();
-//..
-xmlhttp.abort(); // 这将会调用我们上面定义的 onabort 回调函数
-
- -

规范

- - - - - - - - - - - - - - -
规范状态备注
{{SpecName('XMLHttpRequest', '#handler-xhr-onabort')}}{{Spec2('XMLHttpRequest')}}WHATWG living standard
- -

浏览器兼容性

- - - -

{{Compat("api.XMLHttpRequestEventTarget.onabort")}}

diff --git a/files/zh-cn/web/api/xmlhttprequesteventtarget/onerror/index.html b/files/zh-cn/web/api/xmlhttprequesteventtarget/onerror/index.html deleted file mode 100644 index 3c604e5026..0000000000 --- a/files/zh-cn/web/api/xmlhttprequesteventtarget/onerror/index.html +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: XMLHttpRequestEventTarget.onerror -slug: Web/API/XMLHttpRequestEventTarget/onerror -tags: - - API - - Event Handler - - XMLHttpRequestEventTarget -translation_of: Web/API/XMLHttpRequestEventTarget/onerror ---- -
{{APIRef("XMLHttpRequest")}}
- -

XMLHttpRequestEventTarget.onerror 是{{domxref("XMLHttpRequest")}} 事务由于错误而失败时调用的函数。

- -

请注意只有在网络层级出现错误时才会调用此函数。如果错误只出现在应用层(比如发送一个HTTP的错误码),这个方法将不会被调用。

- -

语法

- -
XMLHttpRequest.onerror = callback;
- -

Values

- - - -

举例

- -
var xmlhttp = new XMLHttpRequest(),
-  method = 'GET',
-  url = 'https://developer.mozilla.org/';
-
-xmlhttp.open(method, url, true);
-xmlhttp.onerror = function () {
-  console.log("** An error occurred during the transaction");
-};
-xmlhttp.send();
-
- -

规范

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('XMLHttpRequest', '#handler-xhr-onerror')}}{{Spec2('XMLHttpRequest')}}WHATWG living standard
- -

浏览器兼容性

- - - -

{{Compat("api.XMLHttpRequestEventTarget.onerror")}}

diff --git a/files/zh-cn/web/api/xmlhttprequesteventtarget/onload/index.html b/files/zh-cn/web/api/xmlhttprequesteventtarget/onload/index.html deleted file mode 100644 index 8e2c27016f..0000000000 --- a/files/zh-cn/web/api/xmlhttprequesteventtarget/onload/index.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: XMLHttpRequestEventTarget.onload -slug: Web/API/XMLHttpRequestEventTarget/onload -translation_of: Web/API/XMLHttpRequestEventTarget/onload ---- -
{{APIRef("XMLHttpRequest")}}
- -

XMLHttpRequestEventTarget.onload 是 {{domxref("XMLHttpRequest")}} 请求成功完成时调用的函数。

- -

语法

- -
XMLHttpRequest.onload = callback;
- -

- - - -

示例

- -
var xmlhttp = new XMLHttpRequest(),
-  method = 'GET',
-  url = 'https://developer.mozilla.org/';
-
-xmlhttp.open(method, url, true);
-xmlhttp.onload = function () {
-  // 处理取回的数据(在 xmlhttp.response 中找到)
-};
-xmlhttp.send();
-
- -

规范

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('XMLHttpRequest', '#handler-xhr-onload')}}{{Spec2('XMLHttpRequest')}}WHATWG living standard
- -

浏览器兼容性

- - - -

{{Compat("api.XMLHttpRequestEventTarget.onload")}}

diff --git a/files/zh-cn/web/api/xmlhttprequesteventtarget/onloadstart/index.html b/files/zh-cn/web/api/xmlhttprequesteventtarget/onloadstart/index.html deleted file mode 100644 index 1501afd132..0000000000 --- a/files/zh-cn/web/api/xmlhttprequesteventtarget/onloadstart/index.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: XMLHttpRequestEventTarget.onloadstart -slug: Web/API/XMLHttpRequestEventTarget/onloadstart -translation_of: Web/API/XMLHttpRequestEventTarget/onloadstart ---- -
{{APIRef("XMLHttpRequest")}}
- -

XMLHttpRequestEventTarget.onloadstart 在{{domxref("XMLHttpRequest")}} 开始传送数据时被调用

- -

语法

- -
XMLHttpRequest.onloadstart = callback;
- -

- - - -

示例

- -
var xmlhttp = new XMLHttpRequest(),
-  method = 'GET',
-  url = 'https://developer.mozilla.org/';
-
-xmlhttp.open(method, url, true);
-xmlhttp.onloadstart = function () {
-  console.log("Download underway");
-};
-xmlhttp.send();
-
- -

规范

- - - - - - - - - - - - - - -
规范状态说明
{{SpecName('XMLHttpRequest', '#handler-xhr-onloadstart')}}{{Spec2('XMLHttpRequest')}}WHATWG 现存标准
- -

浏览器兼容性

- - - -

{{Compat("api.XMLHttpRequestEventTarget.onloadstart")}}

diff --git a/files/zh-cn/web/api/xmlhttprequesteventtarget/onprogress/index.html b/files/zh-cn/web/api/xmlhttprequesteventtarget/onprogress/index.html deleted file mode 100644 index 40641b30a6..0000000000 --- a/files/zh-cn/web/api/xmlhttprequesteventtarget/onprogress/index.html +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: XMLHttpRequestEventTarget.onprogress -slug: Web/API/XMLHttpRequestEventTarget/onprogress -translation_of: Web/API/XMLHttpRequestEventTarget/onprogress ---- -

{{APIRef("XMLHttpRequest")}}

- -

XMLHttpRequestEventTarget.onprogress 是在 {{domxref("XMLHttpRequest")}} 完成之前周期性调用的函数。

- -

语法

- -
XMLHttpRequest.onprogress = callback;
- -

- - - -

事件

- - - -
XMLHttpRequest.onprogress = function (event) {
-  event.loaded;
-  event.total;
-};
- -

示例

- -
var xmlhttp = new XMLHttpRequest(),
-  method = 'GET',
-  url = 'https://developer.mozilla.org/';
-
-xmlhttp.open(method, url, true);
-xmlhttp.onprogress = function () {
-  //do something
-};
-xmlhttp.send();
-
- -

规范

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('XMLHttpRequest', '#handler-xhr-onload')}}{{Spec2('XMLHttpRequest')}}WHATWG living standard
- -

浏览器兼容性

- -

{{Compat("api.XMLHttpRequestEventTarget.onprogress")}}

-- cgit v1.2.3-54-g00ecf