ခလုတ် ပုံစံEnctype Property
ဥပမာ
ဆာဗာတစ်ခုသို့ မပို့မီ ဖောင်ဒေတာကို ကုဒ်သွင်းနည်းကို ပြန်ပေးပါ။
var x = document.getElementById("myBtn").formEnctype;
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
formEnctype ပိုင်ဆိုင်မှုသည် ခလုတ်တစ်ခု၏ formenctype attribute ၏တန်ဖိုးကို သတ်မှတ် သို့မဟုတ် ပြန်ပေးသည်။
formenctype attribute သည် ဆာဗာသို့မပို့မီ ဖောင်ဒေတာကို မည်သို့ကုဒ်လုပ်ရမည်ကို သတ်မှတ်ပေးသည်။ ဤရည်ညွှန်းချက်သည် ဖောင်၏ enctype attribute ကို အစားထိုးသည်။
formenctype attribute ကို type="submit" ပါသော ခလုတ်များအတွက်သာ အသုံးပြုပါသည်။
မှတ်ချက်- HTML5 ရှိ <button> ဒြပ်စင်အတွက် formenctype attribute သည် အသစ်ဖြစ်သည်။
Browser ပံ့ပိုးမှု
Property | |||||
---|---|---|---|---|---|
formEnctype | Yes | 10.0 | Yes | Yes | Yes |
အထားအသို
formEnctype ပိုင်ဆိုင်မှုကို ပြန်ပေးပါ။
buttonObject.formEnctype
formEnctype ပိုင်ဆိုင်မှုကို သတ်မှတ်ပါ-
buttonObject.formEnctype = "application/x-www-form-urlencoded,multipart/form-data,text/plain"
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
application/x-www-form-urlencoded | All characters are encoded before sent (this is default) |
multipart/form-data | No characters are encoded. This value is required when you are using forms that have a file upload control |
text/plain | Spaces are converted to "+" symbols, but no special characters are encoded |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | ဆာဗာသို့ ဖောင်တင်ပြရန် အသုံးပြုသည့် အကြောင်းအရာအမျိုးအစားကို ကိုယ်စားပြုသည့် စာကြောင်းတစ်ခု |
---|
နောက်ထပ် ဥပမာများ
ဥပမာ
ခလုတ်တစ်ခု၏ formenctype attribute ၏တန်ဖိုးကို "text/plain" မှ "application/x-www-form-urlencoded" သို့ ပြောင်းပါ-
document.getElementById("myBtn").formEnctype = "application/x-www-form-urlencoded";
ဥပမာ
formEnctype ပိုင်ဆိုင်မှုကို ပြန်ပေးခြင်းဆိုင်ရာ အခြားဥပမာ-
var x =
document.getElementById("myBtn").formEnctype;
ဆက်စပ်စာမျက်နှာများ
HTML ရည်ညွှန်းချက်- HTML <button> formenctype ရည်ညွှန်းချက်
❮ ခလုတ်အရာဝတ္ထု