<!DOCTYPE html>
<html>
<body>

<h2>Using the XMLHttpRequest object</h2>

<button type="button" onclick="loadXMLDoc()">Change Content</button>

<p id="demo"></p>

<script>
function loadXMLDoc() {
  var xmlhttp = new XMLHttpRequest();
  xmlhttp.open("GET", "xmlhttp_info.txt", false);
  xmlhttp.send();
  document.getElementById("demo").innerHTML =
  xmlhttp.responseText;
}
</script>

</body>
</html>