jquery里面有css选择器代码大概如下$(".top1div").each(function(){$(this).children().each(alert($(this).attr("id")););});