AJAX请求返回200 OK,但是一个错误事件被触发而不是成功。
var row = "1";var json = "{'TwitterId':'" + row + "'}";$.ajax({ type: 'POST', url: 'Jqueryoperation.aspx?Operation=DeleteRow', contentType: 'application/json; charset=utf-8', data: json, dataType: 'json', cache: false, success: AjaxSucceeded, error: AjaxFailed});function AjaxSucceeded(result) { alert("hello"); alert(result.d);}function AjaxFailed(result) { alert("hello1"); alert(result.status + ' ' + result.statusText);}
JqueryOpeartion.aspx
protected void Page_Load(object sender, EventArgs e) { test();}private void test() { Response.Write("<script language='javascript'>alert('Record Deleted');</script>");}
("Record deleted")
喵喵时光机
MMTTMM
守候你守候我