This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

The XMLHttpRequest Object

// button click to loadDoc() function
onclick="loadDoc()"

// display XMLHttpRequest Object contents
function loadDoc() {
  const xhttp = new XMLHttpRequest();
  xhttp.onload = function() {
    document.getElementById("demo").innerHTML = this.responseText;
  };

// defines the XMLHttpRequest Object to POST
  xhttp.open("POST", "demo_post.php");
  xhttp.send();
}