Starting today, we have officially studied Asp.net Ajax.
XMLHTTPRequest object
Attribute:
NumberReadystate(Return Value 4 indicates completion)
FunctionOnreadystatechange(Execute the callback function)
StringResponsetext(Return string type)
XmldocumentResponsexml(XML type returned)
NumberStatus(Return Value: 200, indicating success)
StringStatustextOK
Method:
VoidOpen(String, String, Boolean)
1: Get, post, head, put, delete, options, trace
2: URL
3: true (asynchronous), false (synchronous)
VoidSend(String) Send request
VoidSetheader(String, string) set header information
StringGetResponseHeader(String) Get the information of a header
VoidAbort() Now that open () is enabled, abort () is required, which is equivalent to closing
Application:
XMLHttpRequest -- submit (send () --> request
Server -- Return --> data <-- Analysis -- Javascript