1.
$.ajax({
type: "post",
contentType: "application/json",
url: "/Home/GetList",
beforeSend: function ()
{
$("loading").show();
},
success: function (data) {
if (data == "Success") {
// ...
}
},
complete: function () {
$("loading").hide();
},
error: function (data) {
console.info("error: " + data.responseText);
}
});