$.ajax({
type:"POST",
url:"urlToAjax.php",
data:{
"data1":dat,
"data2":dat2
},
success : function(results) {
console.log(results)
//any code if succeed goes here
},
error : function(res){
console.log(res)
//any code to generate error report goes here
}
});
The code above sends Request using POST.
That's all folks.
Tidak ada komentar:
Posting Komentar