js:length 属性可返回字符串中的字符数目。
stringObject.length
jQuery:length 属性包含 jQuery 对象中元素的数目。
$(selector).length
<script type="text/javascript">
var txt="Hello World!"
document.write(txt.length)-------12
</script>
$("button").click(function(){ alert($();"li").length
alert($();"div:hidden").length
});