亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

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

定義和用法

<button> 標(biāo)簽定義按鈕。

您可以在 button 元素內(nèi)放置內(nèi)容,比如文本或圖像。這是該元素與通過 input 元素創(chuàng)建的按鈕的不同之處。

請(qǐng)始終為按鈕規(guī)定 type 屬性。不同的瀏覽器根據(jù) type 屬性使用不同的默認(rèn)值。

實(shí)例

標(biāo)記一個(gè)按鈕:

<button type="button">Click Me!</button>

親自試一試

HTML 4.01 與 HTML 5 之間的差異

HTML 5 中的新屬性:autofocus, form, formaction, formenctype, formmethod, formnovalidate 以及 formtarget。

提示和注釋

注釋:如果在 HTML 表單中使用 button 元素,不同的瀏覽器會(huì)提交不同的按鈕值。請(qǐng)使用 input 元素在 HTML 表單中創(chuàng)建按鈕。

屬性

new : HTML5 中的新屬性。

屬性 描述
autofocus autofocus 規(guī)定當(dāng)頁面加載時(shí)按鈕應(yīng)當(dāng)自動(dòng)地獲得焦點(diǎn)。
disabled disabled 規(guī)定應(yīng)該禁用該按鈕。
form form_name 規(guī)定按鈕屬于一個(gè)或多個(gè)表單。
formaction url

覆蓋 form 元素的 action 屬性。

注釋:該屬性與 type="submit" 配合使用。

formenctype 見注釋

覆蓋 form 元素的 enctype 屬性。

注釋:該屬性與 type="submit" 配合使用。

formmethod
  • get
  • post

覆蓋 form 元素的 method 屬性。

注釋:該屬性與 type="submit" 配合使用。

formnovalidate formnovalidate

覆蓋 form 元素的 novalidate 屬性。

注釋:該屬性與 type="submit" 配合使用。

formtarget
  • _blank
  • _self
  • _parent
  • _top
  • framename

覆蓋 form 元素的 target 屬性。

注釋:該屬性與 type="submit" 配合使用。

name button_name 規(guī)定按鈕的名稱。
type
  • button
  • reset
  • submit
規(guī)定按鈕的類型。
value text 規(guī)定按鈕的初始值?捎赡_本進(jìn)行修改。

注釋:formenctype 屬性可能的值:

  • application/x-www-form-urlencoded
  • multipart/form-data
  • text/plain

全局屬性

<button> 標(biāo)簽支持 HTML 5 中的全局屬性。

事件屬性

<button> 標(biāo)簽支持 HTML 5 中的事件屬性。