jQuery Ajax post method loads data from server using the HTTP POST Request.
jQuery Ajax $.post() Method Syntax
$.post(url,function(response,status));
url(Required): Url of the file you want to load.
function : (optional): Callback is executed when the request completes.
jQuery Ajax post method Example
Output :
note : post_method_demo.php contains the following code
Post Method Demo You Posted : <?php if(isset($_POST['firstName'])){ echo "first name = ".$_POST['firstName'].""; } if(isset($_POST['lastName'])){ echo " last name = ".$_POST['lastName'].""; } ??>