分享下jquery取子節(jié)點及當前節(jié)點屬性值的方法。
<li class="menulink"><a href="#" rel="external nofollow" id="101" onclick="changeMenu('101','福娃網','http://www.fuwa.org/' )"><span>福娃網</span></a></li>
取子節(jié)點:
$(".menulink a").each(function(){var id=this.id;});
取當前節(jié)點:
$(".menulink ").each(function(){var id=this.id;});
新聞熱點
疑難解答
圖片精選