Do you know How to use Jquery Ajax ?

jQuery’s AJAX syntax allows you to make asynchronous HTTP requests to a server and handle the response using JavaScript.

<!DOCTYPE html>



    <title>jQuery AJAX Example</title>

    <script src=""></script>



    <button id="load-data">Load Data</button>

    <div id="result"></div>


      $(document).ready(function () {

        // Event handler for the button click

        $("#load-data").click(function () {

          // Make an AJAX request


            url: "", // URL of the server endpoint

            method: "GET", // HTTP method (GET, POST, etc.)

            dataType: "json", // Expected data type of the response

            success: function (data) {

              // Function to handle the successful response

              $("#result").html("Received data: " + JSON.stringify(data));


            error: function (xhr, status, error) {

              // Function to handle errors

              console.error("Error:", error);