querySelectorAll 和 jQuery选择器

参考

http://xahlee.info/js/jquery_diff_querySelectorAll.html

http://stackoverflow.com/questions/11503534/jquery-vs-document-queryselectorall

最明显的区别就是 $() 返回的结果可以使用 map filter children parent each等方法

而querySelectAll返回的是一个NodeList集合 很像数组 同样可以使用[index]来取值  但是只有length方法

posted @ 2015-04-29 22:26  cart55free99  阅读(470)  评论(0编辑  收藏  举报