1、new 一個引擎
代碼:var xhr=new XMLHttpRequest();
John.Yu(7054918) 16:08:16
2、設定工作參數:
代碼:xhr.open("GET","url?uname=john");
3、設置回調函數:
John.Yu(7054918) 16:09:51
xhr.onreadystatechange=function(){
alert(xhr.responseText);
}
4、發送請求:
send(null);
==============================
代碼:var xhr=new XMLHttpRequest();
John.Yu(7054918) 16:08:16
2、設定工作參數:
代碼:xhr.open("GET","url?uname=john");
3、設置回調函數:
John.Yu(7054918) 16:09:51
xhr.onreadystatechange=function(){
alert(xhr.responseText);
}
4、發送請求:
send(null);
==============================
未完待續。。。