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

Let AJAX change this text.

// button click for loadDoc()
onclick="loadDoc()"

// display XMLHttpRequest Object contents
function loadDoc() {
  var xhttp = new XMLHttpRequest();

// defines the XMLHttpRequest Object to retrieve and set async = false
  xhttp.open("GET", "ajax_info.txt", false);
  xhttp.send();
  document.getElementById("demo").innerHTML = xhttp.responseText;
}