AJAX

javascript

AJAX: Asynchronous JavaScript and XML

<script>
    var xhr = new XMLHttpRequest();
    var url = "//example.com";
    xhr.open("GET", url);
    xhr.onreadystatechange = function() {
        if (xhr.status === 200 && xhr.readyState === 4) {
            document.querySelector("body").innerHTML = xhr.responseText
        }
    }
    xhr.send();
</script>
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License