论坛首页 Web前端技术论坛

JQuery ajaxComplete doc错误提醒与纠正

浏览 4583 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2007-07-03  
JQuery 官方API说明文档中对全局的ajax事件,如ajaxComplete,ajaxError,ajaxSend,ajaxStart,ajaxStop,ajaxSuccess等说明和示例代码有严重的遗漏和欠缺:

	$("#msg").ajaxComplete(function(request, settings){
	  alert(request.responseText);
	});


alert出来的是undifined!

正确的API应该是function中有三个参数,第二个方是XMLHttpRequest对象:
	$("#msg").ajaxComplete(function(whoareyou, request, settings){
	  alert(request.responseText);
	});


这个重要的API说明和示例代码不应该出现如此错误,多少人可能因为这个错误而不得不放弃使用这个有意义的功能。

参考:
http://www.mail-archive.com/discuss@jquery.com/msg13426.html
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics