jQuery 属性length属性返回jQuery对象中元素的数量。语法:$(selector).length示例提醒段落数:示例$("button").click(function(){ alert($("p").length); });测试看看‹/›计算DIV。点击添加更多:这里有两个div。单击此处添加更多DIV盒子运行代码jQuery 属性 jQuery 杂项 index() 方法 jQuery 杂项 data() 方法