I have a page similar to:
2条回答 孤独总比滥情好 (楼主) 2021-01-29 05:21 jQuery: $("div[id]").filter(function() { return !(/^box:content:\d+:text$/.test(this.id)); }).size(); Pure JavaScript: var elems = document.getElementsByTagName("div"), count = 0; for (var i=0, n=elems.length; i 0 讨论(0) 查看其它2个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
jQuery:
$("div[id]").filter(function() { return !(/^box:content:\d+:text$/.test(this.id)); }).size();
Pure JavaScript:
var elems = document.getElementsByTagName("div"), count = 0; for (var i=0, n=elems.length; i