Sti*_*ers 7 javascript jquery prototypejs
是否有一个jQuery等同于这个原型代码?
Ajax.Responders.register({
onException: function(x,y)
{
if(y.message!="Syntax error") new Insertion.After("toperrorbox","<p style='color:red'>"+y.message+"</p>");
}
});
Run Code Online (Sandbox Code Playgroud)
http://docs.jquery.com/Ajax/ajaxError#examples
$('#toperrorbox').ajaxError(function (event, request, settings) {
$(this).after("<p style='color:red'>"+ request.responseText +"</p>");
}
Run Code Online (Sandbox Code Playgroud)
附加一个在 AJAX 请求失败时执行的函数。
| 归档时间: |
|
| 查看次数: |
3090 次 |
| 最近记录: |