Q:

xmlhttprequest simple example


var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {

    if (this.readyState == 4 && this.status == 200) {

        // Typical action to be performed when the document is ready:
       
 document.getElementById("demo").innerHTML = xhttp.responseText;

    }
};

xhttp.open("GET", "filename", true);

xhttp.send();
 
0

New to Communities?

Join the community