• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

常用的XmlHttpRequest对象属性_jquery

jquery 搞代码 7年前 (2018-06-12) 73次浏览 已收录 0个评论

Common XMLHttpRequest Object Methods

Method Description
abort() Stops the current request
getAllResponseHeaders() Returns complete set of headers (labels and values) as a string
getResponseHeader(“headerLabel“) Returns the string value of a single header label
open(“method“, “URL“[, asyncFlag[, “userName“[, “password“]]]) Assigns destination URL, method, and other optional attributes of a pending request
send(content) Transmits the request, optionally with postable string or DOM object data
setRequestHeader(“label“, “value“) Assigns a label/value pair to the header to be sent with a request

 

常用的XmlHttpRequest对象属性

 

属性 描述
onreadystatechange 每次状态改变所触发事件的事件处理程序
readyState 对象状态值:

  • 0 = 未初始化(uninitialized)
  • 1 = 正在加载(loading)
  • 2 = 加载完毕(loaded)
  • 3 = 交互(interactive)
  • 4 = 完成(complete)
responseText 从服务器进程返回的数据的字符串形式
responseXML 从服务器进程返回的DOM兼容的文档数据对象
status 从服务器返回的数字代码,比如404(未找到)或200(就绪)
statusText 伴随状态码的字符串信息

欢迎大家阅读《常用的XmlHttpRequest对象属性_jquery,跪求各位点评,若觉得好的话请收藏本文,by 搞代码


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:常用的XmlHttpRequest对象属性_jquery
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址