How to use jQuery Ajax Request/Method?

JQuery Ajax Method

JQuery Ajax Method is used to perform an asynchronous HTTP (Ajax) request. The jQuery library provides a few different methods to perform AJAX calls, although here we’ll look at the ajax method, which is the most often used.

Take a look at the following example.

<script type="text/javascript">
            url: "/test/url-to-post.php",
            dataType: "json",
            type: "POST",
            data: {"id":"1"},
            success: function (data) {
            error: function() {

Don’t forget to use jquery CDN to make this code work.

<html lang="en">
  <title>JQuery Ajax Demo</title>
  <script src=""></script>

You can get more details about this topic from here.
To get to know more about other JQuery topics, you can check these articles too.

Please follow and like us:

Related Posts

Leave a Reply