Welcome to my website, have a nice day!
Dream it, Do it, Make it!

jQuery根据多个class name获取元素

实现方式:

<a href="javascript:void(0);" class="centerLeftNav active" id="1></a>
<a href="javascript:void(0);" class="centerLeftNav" id="2"></a>

var aTagId = $(".centerLeftNav.active").attr("id");
赞(0)
未经允许禁止转载:Ddmit » jQuery根据多个class name获取元素

评论 抢沙发

登录

找回密码

注册