jQuery get() method sends an HTTP GET request to a page load data from the server back.
If any request with jQuery.get() method returns an error code then it will fail without notification unless the script has also called the global .ajaxError() method. In other side, as of jQuery 1.5, the .error() method of the jqXHR object is returned by jQuery.get() which is also available for error handling.
$("button").click(function(){
$.get("ajax.php", function(data, status){
console.log("Data: " + data + " " + "Status: " + status);
});
});
You can pass some additional parameters there:
$.get("ajax.php", { name:"John", age:"35" });
For jquery reference click here.
The coronavirus outbreak has drastically changed the way we live our lives. Yes, that's absolutely…
Sales and marketing teams help attract, convert, and retain customers to ensure an organization’s long-term…
Are you an owner of a small business who’s trying to come up with ways…
Introduction When patients bring me their lab reports, the confusion is almost always the same.…
Are you excited about remodeling your house after a long time? Perhaps if you're planning…
The practice of yoga teaches us to be present, patient and mindful of our decisions.…