HTML DOM ထည့်သွင်းခြင်း ရေဒီယို အရာဝတ္ထု
ရေဒီယိုအရာဝတ္ထုကို ထည့်သွင်းပါ။
Input Radio object သည် type="radio" ဖြင့် HTML <input> element ကို ကိုယ်စားပြုသည်။
Input Radio Object တစ်ခုကို ဝင်ရောက်ကြည့်ရှုပါ။
getElementById() ကိုအသုံးပြုခြင်းဖြင့် type="radio" ဖြင့် <input> element ကို ဝင်ရောက်ကြည့်ရှုနိုင်သည်
ဥပမာ
var x = document.getElementById("myRadio");
အကြံပြုချက်- ဖောင် တစ်ခု၏ အစိတ်အပိုင်းများ စုစည်းမှု မှတစ်ဆင့် ရှာဖွေခြင်းဖြင့် <input type="radio">ကိုလည်း ဝင်ရောက်ကြည့်ရှု နိုင်ပါသည်။
Input Radio Object ဖန်တီးပါ။
document.createElement() နည်းလမ်းကို အသုံးပြု၍ type="radio" ဖြင့် <input> element တစ်ခုကို ဖန်တီးနိုင်သည်-
ဥပမာ
var x = document.createElement("INPUT");
x.setAttribute("type", "radio");
ရေဒီယို Object Properties ကို ထည့်သွင်းပါ။
Property | Description |
---|---|
autofocus | Sets or returns whether a radio button should automatically get focus when the page loads |
checked | Sets or returns the checked state of a radio button |
defaultChecked | Returns the default value of the checked attribute |
defaultValue | Sets or returns the default value of a radio button |
disabled | Sets or returns whether the radio button is disabled, or not |
form | Returns a reference to the form that contains the radio button |
name | Sets or returns the value of the name attribute of a radio button |
required | Sets or returns whether the radio button must be checked before submitting a form |
type | Returns which type of form element the radio button is |
value | Sets or returns the value of the value attribute of the radio button |
စံသတ်မှတ်ချက်များနှင့် အစီအစဉ်များ
Input Radio object သည် စံ ဂုဏ်သတ္တိများ နှင့် အဖြစ်အပျက်များ ကို ပံ့ပိုး ပေးပါသည်။
ဆက်စပ်စာမျက်နှာများ
HTML သင်ခန်းစာ- HTML ပုံစံများ
HTML ရည်ညွှန်း- HTML <input> တဂ်
HTML ရည်ညွှန်း- HTML <input> type attribute