document.querySelectorAll
来源:互联网 发布:mac p ro u盘读不出来 编辑:程序博客网 时间:2024/06/10 20:51
Returns a list of the elements within the document (using depth-first pre-order traversal of the document's nodes) that match the specified group of selectors. The object returned is a NodeList. where The returned NodeList will contain all the elements in the document that are matched by any of the specified selectors. This example returns a list of all Returns a non-live Throws a Summary
Syntax
elementList = document.querySelectorAll(selectors);
elementList
is a non-live NodeList of element objects.selectors
is a string containing one or more CSS selectors separated by commas.Example
div
elements within the document
with a class of either "note
" or "alert
":1
var
matches = document.querySelectorAll(
"div.note, div.alert"
);
Notes
NodeList
of all the matching element nodes.SYNTAX_ERR
exception if the specified group of selectors is invalid.querySelectorAll()
was introduced in the WebApps API.Browser compatibility
Browser Support Notes Internet Explorer8 Firefox (Gecko)3.5 (1.9.1) Opera10 Chrome1 Safari (webkit)3.2 (525.3)webk.it/16587Specification
See also
document.querySelector
element.querySelectorAll
element.querySelector
Code snippets for querySelector
- document.querySelectorAll
- document.querySelector和querySelectorAll方法
- document.querySelector和querySelectorAll方法
- document.querySelector以及document.querySelectorAll中的转义符
- document自带的强大的选择器querySelector/querySelectorAll
- querySelectorAll选择器
- HTML5 -- querySelectorAll()
- querySelector(),querySelectorAll()
- 再谈querySelector和querySelectorAll
- querySelector querySelectorAll 记录
- html querySelector与querySelectorAll
- querySelector和querySelectorAll
- querySelector和querySelectorAll区别
- querySelector()和querySelectorAll()
- javascript函数querySelector,querySelectorAll介绍
- javascript中的querySelector()和querySelectorAll()
- querySelector、querySelectorAll选择元素示例
- DOM元素querySelectorAll和querySelector
- XJOJ 105 扫雷
- 源码阅读笔记 Activity(一)
- 发泄一下,兼谈个人工程和团队工程的区别
- 去掉表单中文本框textarea中的垂直滚动条去掉
- Apple公司的官方声明
- document.querySelectorAll
- 利用WIN7无线承载网络设置WIFI热点,让M9无线上网
- Leading a team
- 设计模式进阶之继承、接口、抽象类
- smarty之html_select_date
- 安装Linux教程
- Emacs常用命令(转)
- android market开发者注册上传app应用教程
- 感触很深的一句话!