载入XML中如何理解同步和异步载入

zombiehao 2010-01-18 10:31:55
本人一新手.
刚看了书.同步异步载入.
感觉很乱.
其中异步模式中.
readystate 5个状态,具体指的是什么的?
xml文件?Dom?

谁能简单和我说下,最好结合代码.
谢谢了...
...全文
113 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
街头小贩 2010-01-18
  • 打赏
  • 举报
回复
xml文件?Dom?
re:
问的是5种状态属于xml?属于dom?
5种状态属于XMLHttpRequest Object!xml只是xhr对象请求目标对象的一种!
街头小贩 2010-01-18
  • 打赏
  • 举报
回复
readystate 5个状态,具体指的是什么的?
re:

readyState of type unsigned short, readonly

The state of the object. The attribute MUSt be one of the following values:

0 Uninitialized
The initial value.
1 Open
The open() method has been successfully called.
2 Sent
The UA successfully completed the request, but no data has yet been received.
3 Receiving
Immediately before receiving the message body (if any). All HTTP headers have been received.
What about HEAD requests?
4 Loaded
The data transfer has been completed.

http://www.w3.org/TR/2006/WD-XMLHttpRequest-20060405/

87,997

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧