Ajax is an abbreviation for asynchronous javascript and Xml.
What is AJAX?
AJAX = Asynchronous JavaScript And XML.
AJAX is not a programming language.
AJAX just uses a combination of:
- A browser built-in
XMLHttpRequest
object (to request data from a web server) - JavaScript and HTML DOM (to display or use the data)
- This JavaScript function can be used to demonstrate the use of AJAX.
- function loadDoc() {
- const xhttp = new XMLHttpRequest();
- xhttp.onload = function() {
- document.getElementById("demo").innerHTML = this.responseText;
- }
- xhttp.open("GET", "ajax_info.txt", true);
- xhttp.send();
- }