您的位置:首页 > 理论基础 > 计算机网络

什么是XMLHttpRequest

2012-03-09 00:00 239 查看
Ajax利用了一个已被内置在所有主流浏览器里的对象——XMLHttpRequest,来发送和接收HTTP请求响应。
Ajax takes advantage of an object built into all modern browsers-the
XMLHttpRequest object-to send and receive HTTP requests and
responses. An HTTP request sent via the XMLHttpRequest object does
not require the page to have or post a <form> element. The “A” in Ajax
stands for “asynchronous”, which means that the XMLHttpRequest
object's send() method returns immediately, letting the browser
processing of other HTML/JavaScript on the Web page continue while the
server processes the HTTP request and sends the response. While
asynchronous requests are the default, the reader can optionally send
synchronous requests, which halt other Web page processing until the page
receives the server's response.
Microsoft introduced the XMLHttpRequest object as an ActiveX
object in Internet Explorer (IE) 5. Other browser manufacturers,
recognizing the object's utility, implemented the XMLHttpRequest
object in their browsers, but as a native JavaScript object rather than as an
ActiveX object. In turn, recognizing the value and security in that
implementation type, Microsoft has recast the XMLHttpRequest in IE
7 as a window object property. Even when the implementation (and thus
invocation) details differ, all the browsers' implementations have similar
functionality and essentially identical methods. The W3C is working to
standardize the XMLHttpRequest object, releasing a working draft of
the W3C specification1.
This chapter discusses the XMLHttpRequest object API in detail,
listing and explaining all the properties and methods.

$(document).ready(function(){dp.SyntaxHighlighter.HighlightAll('code');});

原文链接:
http://blog.csdn.net/newhappy2008/article/details/4392293
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: