使用jquery怎么选择有两个class的元素

2025-03-10 10:34:04
推荐回答(3个)
回答1:

依次过滤 $(".box_list).filter("clearfix")
属性选择 $("[class='box_list clearfix']") //此处顺序必须一致才行
直接选择 $(".box_list.clearfix")

回答2:

写其中一个就行了

回答3:

$('.class1,.class2')