From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../xmlhttprequesteventtarget/onload/index.html | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 files/fr/web/api/xmlhttprequesteventtarget/onload/index.html (limited to 'files/fr/web/api/xmlhttprequesteventtarget/onload') diff --git a/files/fr/web/api/xmlhttprequesteventtarget/onload/index.html b/files/fr/web/api/xmlhttprequesteventtarget/onload/index.html new file mode 100644 index 0000000000..33c90dabc2 --- /dev/null +++ b/files/fr/web/api/xmlhttprequesteventtarget/onload/index.html @@ -0,0 +1,56 @@ +--- +title: XMLHttpRequestEventTarget.onload +slug: Web/API/XMLHttpRequestEventTarget/onload +translation_of: Web/API/XMLHttpRequestEventTarget/onload +--- +

 

+ +
{{APIRef("XMLHttpRequest")}}
+ +

The XMLHttpRequestEventTarget.onload is the function called when an {{domxref("XMLHttpRequest")}} transaction completes successfully.

+ +

Syntax

+ +
XMLHttpRequest.onload = callback;
+ +

Values

+ + + +

Example

+ +
var xmlhttp = new XMLHttpRequest(),
+  method = 'GET',
+  url = 'https://developer.mozilla.org/';
+
+xmlhttp.open(method, url, true);
+xmlhttp.onload = function () {
+  // Do something with the retrieved data ( found in xmlhttp.response )
+};
+xmlhttp.send();
+
+ +

Specifications

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

Browser compatibility

+ + + +

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

-- cgit v1.2.3-54-g00ecf