本页内容
上一节: Prop_jquery_support 下一节: Prop_cssnumber

jQuery length 属性

jQuery 属性

输出 <li> 元素的数目:


示例

$("button").click(function(){

    alert($("li").length);

    });

定义和用法

length 属性包含 jQuery 对象中元素的数目。

语法

$(selector).length

jQuery 属性

上一节: Prop_jquery_support 下一节: Prop_cssnumber
此页面最后编辑于2022年8月19日 (星期五) 11:49。