id
id
全局属性定义了一个全文档唯一的标识符(ID)。
尝试一下
描述
规范
Specification |
---|
HTML # global-attributes:the-id-attribute-2 |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- Has more compatibility info.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
参见
- 所有的全局属性。
- 反映该属性的
Element.id
。 Document.getElementById
方法。- CSS ID 选择器。