1$.ajax({
2 url: "/something",
3 type: "GET",
4 data: {p1: "value1", p2: "value2"}, // multiple data we want to send
5 success: function(data){
6 console.log(data);
7 }
8}).done(function(){
9 console.log("Success.");
10}).fail(function(){
11 console.log("An error has occurred.");
12}).always(function(){
13 console.log("Complete.");
14});