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 contents of XMLHttpRequest Object
function loadDoc() {
  const xhttp = new XMLHttpRequest();
  xhttp.onload = function() {
    document.getElementById("demo").innerHTML = this.responseText;
  }

// defines the XMLHttpRequest Object to retrieve
  xhttp.open("GET", "demo_get.php?t=" + Math.random());
  xhttp.send();
}