What is AJAX?
AJAX = Asynchronous JavaScript and XML.
AJAX is based on internet standards, and uses a combination of:
- XMLHttpRequest object (to retrieve data from a web server)
- JavaScript/DOM (to display/use the data)
The keystone of AJAX is the XMLHttpRequest object.
The XMLHttpRequest Object
All modern browsers support the XMLHttpRequest object.
The XMLHttpRequest object is used to exchange data with a server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.
Create an XMLHttpRequest Object
All modern browsers (Chrome, IE7+, Firefox, Safari, and Opera) have a built-in XMLHttpRequest object.
Syntax for creating an XMLHttpRequest object:
variable = new XMLHttpRequest();
No comments:
Post a Comment