Home  >  Article  >  Web Front-end  >  HTML5中对id属性的定义与规定

HTML5中对id属性的定义与规定

WBOY
WBOYOriginal
2016-05-17 09:10:082601browse

此次课程主讲内容是ID元素

id是一个元素的唯一标识,需确保每个元素的id的独一性。
id
至少由一个字符组成,且不能包含空字符。
具有不为空id属性的元素,可以在cssDOMgetElementById() 方法中方便调用。
不排除一个元素有多个id的可能。
id
属性值必须反映该元素的内容。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn