<p class="MsoNormal" style="margin-left: 36pt; text-align: left;" align="left"><span style="font-size: 12pt; font-family: 宋体;" lang="EN-US">此次课程主讲内容是ID元素<br></span></p> <p class="MsoNormal" style="MARGIN-LEFT: 36pt; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt" lang="EN-US">id</span><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">是一个元素的唯一标识,需确保每个元素的<span lang="EN-US">id</span>的独一性。<span lang="EN-US"><br>id</span>至少由一个字符组成,且不能包含空字符。<span lang="EN-US"><br></span>具有不为空<span lang="EN-US">id</span>属性的元素,可以在<span lang="EN-US">css</span>或<span lang="EN-US">DOM</span>的<span lang="EN-US">getElementById() </span>方法中方便调用。<span lang="EN-US"><br></span>不排除一个元素有多个<span lang="EN-US">id</span>的可能。<span lang="EN-US"><br>id</span>属性值必须反映该元素的内容。<span lang="EN-US"></span></span></p>