我有一个名为 A.aspx 的页面,它使用loadjQuery 方法加载 B.aspx。像这样:
$('#doclist').load('Documents.aspx #div1', { idMsg: $(this).data('cid') }, function (response, status, xhr) {
if (status == "error") {
var msg = "Error.";
$('#doclist').html("<span>" + msg + xhr.status + " " + xhr.statusText + ". " + "</span>");
}
});
404这可以处理诸如or之类的异常500 Internal server error。B 页面从 DataBase 中检索数据并且 aDBException被抛出但未被loadjQuery 方法捕获。
我没有在代码后面做任何事情。