jQuery post() Method loads data from the server using a HTTP POST request.
$(selector).post(URL, data, function(data,status,xhr), dataType)
$.post( "ajax-master.php", function( data ) {
$( "#result" ).html( data );
});
The above example fetches the requested HTML snippet and inserts it on the page based on ID.
Read also: Abort Ajax requests using jQuery
To ignore a result, you can use below code:
$.post( "ajax-master.php" );
You can pass additional parameters there also as below:
$.post( "ajax-master.php", { name: "John", age: "25" } ); You can pass arrays of data to the server as below:
$.post( "ajax-master.php", { 'name[]': [ "Hanse", "jane" ] } ); See jQuery reference for more details.
Let’s face it. Tech buzzwords get thrown around a lot—especially when it comes to how…
In today’s digital world, the boundaries between technology, finance, and innovation are rapidly disappearing. Businesses…
Backyard gatherings like BBQs, family reunions, and garden parties are an exciting way to enjoy…
Marketers are always on the lookout for more effective ways to reach their target audiences.…
Does your phone control your mind more than you control your phone? Modern life exploits…
Did you know that the prostate continues growing throughout a man's entire life, making BPH…