HTML <button> 鏍囩


瀹炰緥

浠ヤ笅浠g爜鏍囪涓涓寜閽細

<button type="button">鐐规垜!</button>

灏濊瘯涓涓 禄

娴忚鍣ㄦ敮鎸

Internet Explorer Firefox Opera Google Chrome Safari

鎵鏈変富娴佹祻瑙堝櫒閮芥敮鎸 <button> 鏍囩銆


鏍囩瀹氫箟鍙婁娇鐢ㄨ鏄

<button> 鏍囩瀹氫箟涓涓寜閽

福彩吉林快三形态—官方网址22270.COM鍦 <button> 鍏冪礌鍐呴儴锛屾偍鍙互鏀剧疆鍐呭锛屾瘮濡傛枃鏈垨鍥惧儚銆傝繖鏄鍏冪礌涓庝娇鐢 <input> 鍏冪礌鍒涘缓鐨勬寜閽箣闂寸殑涓嶅悓涔嬪銆

鎻愮ず锛璇峰缁堜负 <button> 鍏冪礌瑙勫畾 type 灞炴с備笉鍚岀殑娴忚鍣ㄥ <button> 鍏冪礌鐨 type 灞炴т娇鐢ㄤ笉鍚岀殑榛樿鍊笺


鎻愮ず鍜屾敞閲

娉ㄩ噴锛濡傛灉鍦 HTML 琛ㄥ崟涓娇鐢 <button> 鍏冪礌锛屼笉鍚岀殑娴忚鍣ㄥ彲鑳戒細鎻愪氦涓嶅悓鐨勬寜閽笺傝浣跨敤 <input> 鍦 HTML 琛ㄥ崟涓垱寤烘寜閽


HTML 4.01 涓 HTML5涔嬮棿鐨勫樊寮

福彩吉林快三形态—官方网址22270.COMHTML5 涓殑鏂板睘鎬э細autofocus銆乫orm銆乫ormaction銆乫ormenctype銆乫ormmethod銆乫ormnovalidate 浠ュ強 formtarget銆


灞炴

New 锛欻TML5 涓殑鏂板睘鎬с

灞炴 鎻忚堪
autofocusNew autofocus 瑙勫畾褰撻〉闈㈠姞杞芥椂鎸夐挳搴斿綋鑷姩鍦拌幏寰楃劍鐐广
disabled disabled 瑙勫畾搴旇绂佺敤璇ユ寜閽
formNew form_id 瑙勫畾鎸夐挳灞炰簬涓涓垨澶氫釜琛ㄥ崟銆
formactionNew URL 福彩吉林快三形态—官方网址22270.COM瑙勫畾褰撴彁浜よ〃鍗曟椂鍚戜綍澶勫彂閫佽〃鍗曟暟鎹傝鐩 form 鍏冪礌鐨 action 灞炴с福彩吉林快三形态—官方网址22270.COM璇ュ睘鎬т笌 type="submit" 閰嶅悎浣跨敤銆
formenctypeNew application/x-www-form-urlencoded
multipart/form-data
text/plain
福彩吉林快三形态—官方网址22270.COM瑙勫畾鍦ㄥ悜鏈嶅姟鍣ㄥ彂閫佽〃鍗曟暟鎹箣鍓嶅浣曞鍏惰繘琛岀紪鐮併傝鐩 form 鍏冪礌鐨 enctype 灞炴с傝灞炴т笌 type="submit" 閰嶅悎浣跨敤銆
formmethodNew get
post
福彩吉林快三形态—官方网址22270.COM瑙勫畾鐢ㄤ簬鍙戦佽〃鍗曟暟鎹殑 HTTP 鏂规硶銆傝鐩 form 鍏冪礌鐨 method 灞炴с福彩吉林快三形态—官方网址22270.COM璇ュ睘鎬т笌 type="submit" 閰嶅悎浣跨敤銆
formnovalidateNew formnovalidate 濡傛灉浣跨敤璇ュ睘鎬э紝鍒欐彁浜よ〃鍗曟椂涓嶈繘琛岄獙璇併傝鐩 form 鍏冪礌鐨 novalidate 灞炴с傝灞炴т笌 type="submit" 閰嶅悎浣跨敤銆
formtargetNew _blank
_self
_parent
_top
framename
瑙勫畾鍦ㄤ綍澶勬墦寮 action URL銆傝鐩 form 鍏冪礌鐨 target 灞炴с傝灞炴т笌 type="submit" 閰嶅悎浣跨敤銆
name name 福彩吉林快三形态—官方网址22270.COM瑙勫畾鎸夐挳鐨勫悕绉般
type button
reset
submit 
瑙勫畾鎸夐挳鐨勭被鍨嬨
value text 瑙勫畾鎸夐挳鐨勫垵濮嬪笺傚彲鐢辫剼鏈繘琛屼慨鏀广


鍏ㄥ眬灞炴

<button> 鏍囩鏀寔 HTML 鐨勫叏灞灞炴


浜嬩欢灞炴

<button> 鏍囩鏀寔 HTML 鐨勪簨浠跺睘鎬


鐩稿叧鏂囩珷

HTML DOM 鍙傝冩墜鍐岋細 Button 瀵硅薄