Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 JQuery 遍历来自像文档这样的后 ajax 的回调数据:
$.post(URL,function(data){ alert($(data+'> div#xy').html();); })
您需要通过执行从“数据”创建 jQuery 对象
var myData = $(data);
那么你可以简单地使用
var whatIWantToSelect = myData.find('enter selector here');
找到你需要的任何东西