status

Xmlhttp object reference
XMLHttpRequest object XMLHttpRequest member onreadystatechange readyState ResponseBody responsestream responseText responsexml status statustext about getallresponseheaders getresponseheader open send setrequestheader status
Returns the HTTP status code of the current request
grammar
lValue = oXMLHttpRequest.status;
Example
var xmlhttp = new ActiveXObject(“Msxml2.XMLHTTP.3.0”);
xmlhttp.open(“GET”, “http://localhost/books.xml”, false);
xmlhttp.send();
alert(xmlhttp.status);
Return value
The long shaping standard HTTP status code is defined as follows: number Description
One hundred
Continue
One hundred and one
Switching protocols
Two hundred
OK
Two hundred and one
Created
Two hundred and two
Accepted
Two hundred and three
Non-Authoritative Information
Two hundred and four
No Content
Two hundred and five
Reset Content
Two hundred and six
Partial Content
Three hundred
Multiple Choices
Three hundred and one
Moved Permanently
Three hundred and two
Found
Three hundred and three
See Other
Three hundred and four
Not Modified
Three hundred and five
Use Proxy
Three hundred and seven
Temporary Redirect
Four hundred
Bad Request
Four hundred and one
Unauthorized
Four hundred and two
Payment Required
Four hundred and three
Forbidden
Four hundred and four
Not Found
Four hundred and five
Method Not Allowed
Four hundred and six
Not Acceptable
Four hundred and seven
Proxy Authentication Required
Four hundred and eight
Request Timeout
Four hundred and nine
Conflict
Four hundred and ten
Gone
Four hundred and eleven
Length Required
Four hundred and twelve
Precondition Failed
Four hundred and thirteen
Request Entity Too Large
Four hundred and fourteen
Request-URI Too Long
Four hundred and fifteen
Unsupported Media Type
Four hundred and sixteen
Requested Range Not Suitable
Four hundred and seventeen
Expectation Failed
Five hundred
Internal Server Error
Five hundred and one
Not Implemented
Five hundred and two
Bad Gateway
Five hundred and three
Service Unavailable
Five hundred and four
Gateway Timeout
Five hundred and five
HTTP Version Not Supported
Remarks
Long shape. This property is read-only. It returns the HTTP status code of the current request. This property can only be obtained after the data is sent and received.
Reference resources
Statustext property
Send method

发布了133 篇原创文章 · 获赞 191 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/blog_programb/article/details/105617018