gpt4 book ai didi

jquery - 在字符串中找到元素

转载 作者:行者123 更新时间:2023-12-01 00:16:38 27 4
gpt4 key购买 nike

假设我有这个脚本

$.get('test.html', function(data){ 
//data
});

如何在 data 中找到具有特定类的 div??

最佳答案

使用data作为$(selector, context)的上下文参数,像这样:

$.get('test.html', function(data){ 
$("div.someClass", data)
});

关于jquery - 在字符串中找到元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4318811/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com