Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
AJAX在jQuery1.8.3中工作,但不在1.9.1中工作_Ajax_Jquery - Fatal编程技术网

AJAX在jQuery1.8.3中工作,但不在1.9.1中工作

AJAX在jQuery1.8.3中工作,但不在1.9.1中工作,ajax,jquery,Ajax,Jquery,如标题所述,我有这个AJAX函数,它在jQuery1.8.3中工作得非常好 $.ajax({ type: "GET", url: "bee.php", success: function(msg) { $("#bee-section").ajaxComplete(function() { $(this).html(msg); }); } }); 但是没有在jQuery1.9.1中工作,并且根本没有显示任何内容。有什么帮助吗?谢谢 来自: 但是,从j

如标题所述,我有这个AJAX函数,它在jQuery1.8.3中工作得非常好

$.ajax({
  type: "GET",
  url: "bee.php",
  success: function(msg) {
     $("#bee-section").ajaxComplete(function() {
     $(this).html(msg);
  });   
  }
});
但是没有在jQuery1.9.1中工作,并且根本没有显示任何内容。有什么帮助吗?谢谢

来自:

但是,从jQuery1.8开始,.ajaxComplete方法只应为 附于文件之后

你应该使用

$(document).ajaxComplete
而不是

$("#bee-section").ajaxComplete
但是这里不需要ajaxComplete,因为您已经在成功回调中了

简单使用

$.ajax({
  type: "GET",
  url: "bee.php",
  success: function(msg) {
     $("#bee-section").html(msg);
  }
});
或者更简单:

$("#bee-section").load("bee.php");
发件人:

但是,从jQuery1.8开始,.ajaxComplete方法只应为 附于文件之后

你应该使用

$(document).ajaxComplete
而不是

$("#bee-section").ajaxComplete
但是这里不需要ajaxComplete,因为您已经在成功回调中了

简单使用

$.ajax({
  type: "GET",
  url: "bee.php",
  success: function(msg) {
     $("#bee-section").html(msg);
  }
});
或者更简单:

$("#bee-section").load("bee.php");

不太清楚为什么您要使用ajaxComplete而不是仅仅使用$bee-section.htmlmsgOMG,啊,您是对的!非常感谢D不太清楚为什么您使用ajaxComplete而不是仅仅使用$bee-section.htmlmsgOMG,啊,您是对的!非常感谢D