What Is AJAX In JQuery

AJAX in jQuery

  • AJAX is a process of Asynchronous Java Script and XML, it is  used a load data from the server.
  • AJAX is read data without a browser, and without a page refresh.
  • It is a way for fast and dynamic web pages.
  • It is update asynchronously web pages with the help of server.
  • AJAX update  a web page without reloading the web page. 

AJAX and jQuery

  • jQuery provides a methods for AJAX web development.
  • jQuery AJAX send request TXT, HTML, XML or JSON data from a server using HTTP post.
  • We load data into HTML elements of our web page.

Example

<!DOCTYPE html>

<html>

<head>

<script type="text/javascript" src="jquery.js"></script>

<script type="text/javascript">

    $(document).ready(function () {

        $("button").click(function () {

            $("div").load('textfile.txt');

        });

    });

</script>

</head>

<body>

 

<div><h2>AJAX change this content</h2></div>

<button>Click here</button>

</body>

</html>

 

Output

 op1.jpg

 

After click button

op2.jpg

You may also want to read these related articles here