欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

HTML 5 <label> 標(biāo)簽

定義和用法

<label> 標(biāo)簽定義控件的標(biāo)注。如果您在 label 元素內(nèi)點(diǎn)擊文本,就會(huì)觸發(fā)此控件。就是說,當(dāng)用戶選擇該標(biāo)簽時(shí),瀏覽器就會(huì)自動(dòng)將焦點(diǎn)轉(zhuǎn)到和標(biāo)簽相關(guān)的表單控件上。

HTML 4.01 與 HTML 5 之間的差異

沒有。

提示和注釋

注釋:"for" 屬性可把 label 綁定到另外一個(gè)元素。請把 "for" 屬性的值設(shè)置為相關(guān)元素的 id 屬性的值。

屬性

屬性 描述 4 5
for id_of_another_field

定義 label 針對哪個(gè)表單元素。設(shè)置為表單元素的 id。

注釋:如果此屬性未被規(guī)定,那么 label 會(huì)關(guān)聯(lián)其內(nèi)容。

4 5

標(biāo)準(zhǔn)屬性

class, contenteditable, contextmenu, dir, draggable, id, irrelevant, 
lang, ref, registrationmark, tabindex, template, title

如需完整的描述,請?jiān)L問 HTML 5 中標(biāo)準(zhǔn)屬性。

事件屬性

onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, 
ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, 
ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, 
onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, 
onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload

如需完整的描述,請?jiān)L問 HTML 5 中事件屬性。

TIY 實(shí)例

label
如何為控件定義標(biāo)記。