Lesson 19 JavaScript(AJAX & Project)AJAXWhat is AJAX? AJAX = Asynchronous JavaScript (发送)And XML(data格式,发送数据载体,现在是json). AJAX is a misleading name. AJAX applications might use XML to transport data, but it is equally common to transport data as plain text or JSON text.
AJAX request:
google 大量交互(request);随时发随时拿到新的内容,How to use AJAX The keystone of AJAX is the XMLHttpRequest object.
1. creating an XMLHttpRequest object var xhttp = new XMLHttpRequest(); 2. send a request to a server, we use the open() and send() methods of the XMLHttpRequest object xhttp.open("GET", "ajax_info.txt", true); xhttp.send();
密码: 1111 2222
|