<button id="btn1">通过ID获取Class</button> <div id="div1"> <div class="aa"></div> </div>
$("#btn1").click(function () { var cname = $("#div1 div").attr("class"); console.log(cname);//aa })