Code has been added to clipboard!

Use of .post() in jQuery AJAX

Example
// returns the test.php document
$.post("entries.php");

// returns the test.php document while passing two arguments with the request
$.post("entries.php", { id: "2", name: "Bob" });

// returns the test.php document while passing an array argument with two items inside with the request
$.post( "entries.php", { "choices[]": ["Bob", "Beth"] });

// You can also send form data using this method
$.post("entries.php", $( "#sampleForm" ).serialize());