我有一个运行良好的 jqgrid。
我想知道是否可以捕获服务器发送的错误?它是怎么做到的?
最佳答案
如果您查看 jqgrid demo site并查看“What's new in version 3.2” 应该有一个关于控制服务器错误的部分。
具体来说,它使用了一个回调参数loadError:
loadError : function(xhr,st,err) {
jQuery("#rsperror").html("Type: "+st+"; Response: "+ xhr.status + " "+xhr.statusText);
}
如 mcv 上面所述,一些错误是数据错误,因此您需要专门处理这些错误。
关于jquery - 如何让 JQGrid 识别服务器发送的错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1636580/