send post jquery code example
Example 1: post jquery
$.post( "test.php", { name: "John", time: "2pm" })
.done(function( data ) {
alert( "Data Loaded: " + data );
});
Example 2: jquery ajax post
$.ajax({
type: "POST",
url: url,
data: data,
success: success,
dataType: dataType
});
Example 3: $post in jquery
$(function(){
$('#myForm').on('submit', function(e){
e.preventDefault();
$.post('http://www.somewhere.com/path/to/post',
$('#myForm').serialize(),
function(data, status, xhr){
});
});
});
Example 4: make ajax request post jquery
$.ajax({
method: "POST",
url: "some.php",
data: { name: "John", location: "Boston" }
})