JQ $("#form1 :input" ).length 与 $("#form1input").length有什么区别?

  $("#form1 :input").length 表示的是id为form1的表格中的input,textarea,select,button中的元素总和。

  $("#form1 input").length 表示的是id为form1的表格中的input元素

 

  #form1 :input中间的空格代表内部,没空格表示本身。

posted on 2014-08-08 14:22  张狂不年轻°  阅读(479)  评论(0编辑  收藏  举报