裝載:http://www.cnblogs.com/mybest/archive/2011/12/13/2285730.html
代碼:$(document).ready(function() {
jQuery("#clearCac").click(function() {jQuery.ajax({
url: "/Handle/Do.aspx",
type: "post",
data: { id: '0' },
dataType: "json",
success: function(msg) {
alert(msg);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert(XMLHttpRequest.status);
alert(XMLHttpRequest.readyState);
alert(textStatus);
},
complete: function(XMLHttpRequest, textStatus) {
this; // 調用本次AJAX請求時傳遞的options參數
}
});
});
});