$("div").each(function(){//通过each来遍历 if($(this).css("display")=='block'){ //通过$(this).css("css名") 来获取当前遍历元素的display值 //这里就是display=block的 } })