HTML DOM Button Object
ခလုတ်အရာဝတ္ထု
ခလုတ်အရာဝတ္ထုသည် HTML <button> ဒြပ်စင်ကို ကိုယ်စားပြုသည်။
Button Object ကို ဝင်သုံးပါ။
getElementById() ကို အသုံးပြု၍ <button> ဒြပ်စင်တစ်ခုကို သင်ဝင်ရောက်နိုင်သည် ။
ဥပမာ
var x = document.getElementById("myBtn");
Button Object တစ်ခုကို ဖန်တီးပါ။
document.createElement() နည်းလမ်းကို အသုံးပြု၍ <button> element တစ်ခုကို ဖန်တီးနိုင်သည်-
ဥပမာ
var x = document.createElement("BUTTON");
Button Object Properties
Property | Description |
---|---|
autofocus | Sets or returns whether a button should automatically get focus when the page loads, or not |
disabled | Sets or returns whether a button is disabled, or not |
form | Returns a reference to the form that contains a button |
formAction | Sets or returns the value of the formaction attribute of a button |
formEnctype | Sets or returns the value of the formenctype attribute of a button |
formMethod | Sets or returns the value of the formmethod attribute of a button |
formNoValidate | Sets or returns whether the form-data should be validated or not, on submission |
formTarget | Sets or returns the value of the formtarget attribute of a button |
name | Sets or returns the value of the name attribute of a button |
type | Sets or returns the type of a button |
value | Sets or returns the value of the value attribute of a button |
စံသတ်မှတ်ချက်များနှင့် အစီအစဉ်များ
Button object သည် စံ ဂုဏ်သတ္တိများ နှင့် ဖြစ်ရပ်များ ကို ပံ့ပိုး ပေးပါသည်။
ဆက်စပ်စာမျက်နှာများ
HTML ရည်ညွှန်း- HTML <button> တဂ်