Ajax基本使用

Ajax 作用: 後臺與服務器進行少量數據交換,實現異步更新 使用步驟: 創建XMLHttpRequest對象:var xhr = new XMLHttpRequest(); 給定請求方式與請求地址:xhr.open(「get」,「www.example.com」); 發送請求:xhr.send(); 獲取服務器端給客戶端的響應數據: xhr.onreadystatechange = functi
相關文章
相關標籤/搜索