Empire Burlesque




Download 3,64 Mb.
bet2/4
Sana21.05.2024
Hajmi3,64 Mb.
#248070
1   2   3   4
Bog'liq
Norboboyev

Metod

Tavsifi

new XMLHttpRequest()

Creates a new XMLHttpRequest object

abort()

Cancels the current request

getAllResponseHeaders()

Returns header information

getResponseHeader()

Returns specific header information

open(method, url, async, user, psw)

Specifies the request
method: the request type GET or POST url: the file location
async: true (asynchronous) or false (synchronous) user: optional user name psw: optional password

send()

Sends the request to the server Used for GET requests

send(string)

Sends the request to the server. Used for POST requests

setRequestHeader()

Adds a label/value pair to the header to be sent

Serverga so‘rov jo‘natish:

  • xhttp.open("GET", "ajax_info.txt", true); xhttp.send();

  • xhttp.open("POST", "demo_post.asp", true);

  • xhttp.send();

  • xhttp.open("POST", "ajax_test.asp", true); xhttp.setRequestHeader("Content-type", "application/x-www-form- urlencoded"); xhttp.send("fname=Henry&lname=Ford");

  • xhttp.open("GET", "ajax_info.txt", false); xhttp.send();

8.2-jadval

Download 3,64 Mb.
1   2   3   4




Download 3,64 Mb.