Get Method in JQuery Ajax.

jQuery $.get() Method Get Method in jQuery Ajax.

The jQuery $.get() method sends an asynchronous HTTP GET request to the server and retrieves the data.

Syntax:-

$.get(URL ,callback);

Parameters Description:-

  1. URL:- Request URL from which we Want to retrieve the data.
  2. DATA:- The optional callback parameter is the name of a function to be executed if the request succeeds.
  3. CALLBACK:- Function to be executed when the request succeeds.

The following example shows how to retrieve data from a text file.

<script>
$("button").click(function(){
  $.get("demo_test.asp", function(data, status){
    alert("Data: " + data + "\nStatus: " + status);
  });
});
</script>

sexpoundsofttechsolution

Get Method in jQuery Ajax.

Get Method in jQuery Ajax.