How to make an AJAX call using JavaScript, without using jQuery?
转载于:https://stackoverflow.com/questions/8567114/how-to-make-an-ajax-call-without-jquery
How to make an AJAX call using JavaScript, without using jQuery?
转载于:https://stackoverflow.com/questions/8567114/how-to-make-an-ajax-call-without-jquery
var xhReq = new XMLHttpRequest();
xhReq.open("GET", "sumGet.phtml?figure1=5&figure2=10", false);
xhReq.send(null);
var serverResponse = xhReq.responseText;
alert(serverResponse); // Shows "15"