Ajax Request Parameters


Send request parameters using data object setting. Its better than send with the URL



// Less readable...
$.ajax({
    url: "something.php?param1=test1&param2=test2",
    ....
});
 
// More readable...
$.ajax({
    url: "something.php",
    data: { param1: test1, param2: test2 }
});


[Ref : http://lab.abhinayrathore.com/jquery-standards/]

Post a Comment