Input Button name Property
ဥပမာ
ခလုတ်တစ်ခု၏အမည်ကို ရယူပါ-
var x = document.getElementById("myBtn").name;
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
အမည်ပိုင်ဆိုင်မှုသည် ထည့်သွင်းခလုတ်တစ်ခု၏ အမည်ရည်ညွှန်းချက်တန်ဖိုးကို သတ်မှတ်ပေးသည် သို့မဟုတ် ပြန်ပေးသည်။
၎င်းကို ဆာဗာသို့ တင်သွင်းပြီးနောက် ဖောင်ဒေတာကို ခွဲခြားသတ်မှတ်ရန်၊ သို့မဟုတ် ကလိုင်းယင့်ဘက်မှ JavaScript ကို အသုံးပြု၍ ဖောင်ဒေတာကို ကိုးကားရန် အမည်ရည်ညွှန်းချက်ကို အသုံးပြုသည်။
မှတ်ချက်- အမည်ရည်ညွှန်းချက်ပါသော ဖောင်ဒြပ်စင်များသာ ဖောင်တစ်ခုတင်သွင်းသည့်အခါ ၎င်းတို့၏တန်ဖိုးများကို ကျော်သွားမည်ဖြစ်သည်။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
name | Yes | Yes | Yes | Yes | Yes |
အထားအသို
အမည် ပိုင်ဆိုင်မှုကို ပြန်ပေးပါ-
buttonObject.name
အမည်ပိုင်ဆိုင်မှုကို သတ်မှတ်ပါ-
buttonObject.name = name
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
name | Specifies the name of the button |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | ထည့်သွင်းခလုတ်၏အမည်ကို ကိုယ်စားပြုသော စာကြောင်းတစ်ခု |
---|
နောက်ထပ် ဥပမာများ
ဥပမာ
ခလုတ်တစ်ခု၏အမည်ကို ပြောင်းပါ-
document.getElementById("myBtn").name = "newButtonName";
ဆက်စပ်စာမျက်နှာများ
HTML ရည်ညွှန်း- HTML <input> အမည် ရည်ညွှန်းချက်
❮ Input Button Object