0
我試圖顯示一個數字整數(0和1)作爲HTTP響應。我不知道如何獲得該整數並存儲它?我應該使用什麼功能?JSON HTTP響應 - 獲取單個整數
http_request.onreadystatechange = function() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
// ...what goes here?...
}
setTimeout("loadJSON()", 1000);
}
}
http_request.open("GET", data_file, true);
http_request.send();
}