Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ms-access/4.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 mobile Can';t删除所有“;李",;列表中的项目_Jquery Mobile - Fatal编程技术网

Jquery mobile Can';t删除所有“;李",;列表中的项目

Jquery mobile Can';t删除所有“;李",;列表中的项目,jquery-mobile,Jquery Mobile,为什么此代码段不删除所有数据列表项 jQuery("#list2 > li").each(function(n,item){ jQuery(item).remove(); }); 您不需要循环,只需执行以下操作: jQuery("#list2 > li").remove(); 删除所有。请在问题中添加更多信息:1-它现在在做什么?2-你打算在什么平台上进行这项活动?我看到您将其标记为jquery mobile,但代码中没有任何内容是针对mobile的。您的

为什么此代码段不删除所有数据列表项

jQuery("#list2 > li").each(function(n,item){         
   jQuery(item).remove();
});

您不需要循环,只需执行以下操作:

jQuery("#list2 > li").remove();

删除所有。请在问题中添加更多信息:1-它现在在做什么?2-你打算在什么平台上进行这项活动?我看到您将其标记为jquery mobile,但代码中没有任何内容是针对mobile的。您的意思是只标记它
jquery