var xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.onreadystatechange = receiveResponse;
xhr.send();
“true”参数是否暗示对象异步加载?如果不是这样,“真”具体是做什么的?
var xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.onreadystatechange = receiveResponse;
xhr.send();
“true”参数是否暗示对象异步加载?如果不是这样,“真”具体是做什么的?
是的。并且默认为真。
是的,该true
值表示请求是异步的。这是 W3Schools 页面的链接: http: //www.w3schools.com/ajax/ajax_xmlhttprequest_send.asp
这是 W3 链接:http ://www.w3.org/TR/XMLHttpRequest/#the-open-method