Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.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
如何迭代通过jquery ajax接收的html?_Jquery_Ajax - Fatal编程技术网

如何迭代通过jquery ajax接收的html?

如何迭代通过jquery ajax接收的html?,jquery,ajax,Jquery,Ajax,我有一个jQueryAjax,它返回一些html作为数据 success: function(data){ $('#ajaxresponse ul.display li input').each(function(index) { ajax响应是来自jqueryajax成功数据的div。如何从响应中获取html 您可以在jQuery中使用find()方法 success: function(data){ $(data).find('#ajaxresponse ul.display li inp

我有一个jQueryAjax,它返回一些html作为数据

success: function(data){
$('#ajaxresponse ul.display li input').each(function(index) {
ajax响应是来自jqueryajax成功数据的div。如何从响应中获取html

您可以在jQuery中使用
find()
方法

success: function(data){
$(data).find('#ajaxresponse ul.display li input').each(function(index) {
  ........................
});
文档:

您可以在jQuery中使用
find()
方法

success: function(data){
$(data).find('#ajaxresponse ul.display li input').each(function(index) {
  ........................
});
文档:

您可以在jQuery中使用
find()
方法

success: function(data){
$(data).find('#ajaxresponse ul.display li input').each(function(index) {
  ........................
});
文档:

您可以在jQuery中使用
find()
方法

success: function(data){
$(data).find('#ajaxresponse ul.display li input').each(function(index) {
  ........................
});

文档:

您可以将其附加到html DOM中您想要的位置,然后按照现在的操作:

success: function(data){
$("#YourDiv").after(returnValue);
$('#ajaxresponse ul.display li input').each(function(index) {

其中returnValue是一个包含ajax返回的数据的变量,您可以将其附加到html DOM中,然后按照现在的操作:

success: function(data){
$("#YourDiv").after(returnValue);
$('#ajaxresponse ul.display li input').each(function(index) {

其中returnValue是一个包含ajax返回的数据的变量,您可以将其附加到html DOM中,然后按照现在的操作:

success: function(data){
$("#YourDiv").after(returnValue);
$('#ajaxresponse ul.display li input').each(function(index) {

其中returnValue是一个包含ajax返回的数据的变量,您可以将其附加到html DOM中,然后按照现在的操作:

success: function(data){
$("#YourDiv").after(returnValue);
$('#ajaxresponse ul.display li input').each(function(index) {

其中returnValue是一个变量,包含ajax返回的数据。

$(数据)。find('ul.display li input')
$(数据)。find('ul.display li input')
$(数据)。find('ul.display li input'))
我认为#ajaxresponse是ajax请求返回的包装元素,但无论如何+1@A.Wolff:这可能取决于他的响应,我无法做出任何预测:)我认为#ajaxresponse是ajax请求返回的包装元素,但无论如何+1@A.Wolff:这可能取决于他的反应,我无法做出任何预测:)我认为#ajaxresponse是ajax请求返回的包装元素,但无论如何+1@A.Wolff:这可能取决于他的响应,我无法做出任何预测:)我认为#ajaxresponse是ajax请求返回的包装元素,但无论如何+1@A.Wolff:这可能取决于他的反应,我无法做出任何预测:)不需要追加。请参阅Pranav Ram的答案。不需要附加。请参阅Pranav Ram的答案。不需要附加。请参阅Pranav Ram的答案。不需要附加。见Pranav Ram的回答。