JS集

时间:2015-01-14 19:40:36   收藏:0   阅读:248

 

统计所有id为pp的标签下<a>标签的个数
js这样写:document.getElementById("pp").getElementsByTagName("a").length;
jquery这样写:$("#pp a").index()+1;

原文:http://www.cnblogs.com/shabi-ef/p/4224545.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!