cploutarchou
2/5/2020 - 3:39 PM

Send data using the POST method. Jquery | Javascript | Ajax

Send data using the POST method. Jquery | Javascript | Ajax

//Similar to`jQuery.get()`,`jQuery.post()`loads data from the server using a HTTP POST request. The code below demonstrates how to send a POST request to`page.php`when`button`is clicked.

jQuery("button").click(function(){
    jQuery.post("page.php", function(data, status){
        alert("Data: " + data + "\\nStatus: " + status);
    });
});