Last active
February 17, 2020 06:42
-
-
Save rashid327/5bbf5da5010b55b6ebdc0cf8c75f56f4 to your computer and use it in GitHub Desktop.
AJAX is not a programming language. AJAX is a technique for accessing web servers from a web page. AJAX stands for Asynchronous JavaScript And XML.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<div id="demo"> | |
<h2>The XMLHttpRequest Object</h2> | |
<button type="button" onclick="loadDoc()">Change Content</button> | |
</div> | |
<script> | |
function loadDoc() { | |
var xhttp = new XMLHttpRequest(); | |
xhttp.onreadystatechange = function() { | |
if (this.readyState == 4 && this.status == 200) { | |
document.getElementById("demo").innerHTML = | |
this.responseText; | |
} | |
}; | |
xhttp.open("GET", "ajax_info.txt", true); | |
xhttp.send(); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment