国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
label - HTML元素

定義

為頁(yè)面上的其它元素指定標(biāo)簽。

Specifies a label for another element on the page.

注釋

要將 LABEL 綁定到其它的控件,請(qǐng)將 LABEL 元素的 FOR 屬性設(shè)置為與該控件的 ID 相同。將 LABEL 綁定到控件的 NAME 屬性毫無(wú)用處。但是,要提交表單,你必須為 LABEL 元素所綁定到的控件指定 NAME。

有兩種方法給所指定的快捷鍵添加下劃線。LABEL 元素的 rich text 支持可以在 ACCESSKEY 屬性所指定的快捷鍵字符兩側(cè)加上 U 元素。如果你更愿意使用樣式表(CSS)來(lái)應(yīng)用樣式,可以將該字符包含在 SPAN 中,并設(shè)置樣式為“text-decoration: underline”。

如果用戶單擊 LABEL,則會(huì)先觸發(fā) LABEL 上的 onclick 事件,然后觸發(fā)由 htmlFor 屬性所指定的控件上的 onclick 事件。按下 LABEL 設(shè)定的快捷鍵將設(shè)置焦點(diǎn)但并不觸發(fā) onclick 事件。

標(biāo)簽不允許嵌套。

此元素在 Internet Explorer 4.0 及以上版本的 HTML 和腳本中可用。

此元素是內(nèi)嵌元素。

此元素需要關(guān)閉標(biāo)簽。

To bind a LABEL to another control, set the FOR attribute of the LABEL element equal to the ID of the control. Binding a LABEL to the NAME attribute of the control has no effect. However, to submit a form, you must specify a NAME on the control to which the LABEL element is being bound.

There are two ways to underline the designated access key. The rich text support in the LABEL element makes it possible to wrap the U element around the character in the label text specified by the ACCESSKEY attribute. If you prefer to use cascading style sheets (CSS) to apply style formatting, enclose the designated character in a SPAN and set the style to "text-decoration: underline".

If the user clicks the LABEL, the onclick event fires on the LABEL and then on the control specified by the htmlFor property. Pressing the access key for the LABEL sets the focus but does not fire the onclick event.

Labels cannot be nested.

This element is available in HTML and script as of Internet Explorer 4.0.

This element is an inline element.

This element requires a closing tag.

元素示例代碼

下面的例子使用了 LABEL 元素和 ACCESSKEY 屬性設(shè)置文本框的焦點(diǎn)。

This example uses the LABEL element and the ACCESSKEY attribute to set focus on a text box.

<LABEL FOR="oCtrlID" ACCESSKEY="1">
    #<SPAN style="text-decoration:underline;">1</SPAN>: Press Alt+1 to set focus to textbox
</LABEL>
<INPUT TYPE="text" NAME="TXT1" VALUE="binding sample 1" 
       SIZE="20" TABINDEX="1" ID="oCtrlID">
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
HTML中l(wèi)abel標(biāo)簽的用途
Scalable Vector Graphics: Working with Text
標(biāo)記語(yǔ)言
html5指南
ABAP Webdynpro Interface View的用法
使用selenium進(jìn)行抓取網(wǎng)頁(yè)的時(shí)候,通過(guò) .text() 獲取不到文本內(nèi)容解決辦法
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服