Saturday, November 13, 2021

Ajax

 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();
  • }

No comments:

Post a Comment

Json vs xml

  XML (Extensible markup language)  was designed to carry data, not to display data. It is a W3C recommendation. Extensible Markup Language ...