HTML <input> formenctype Attribute
ဥပမာ
ပုံသေကုဒ်လုပ်ထားသည့် ဖောင်ဒေတာကို ပေးပို့ပါ (ပထမ တင်သွင်းရန်ခလုတ်)၊ နှင့် "အပိုင်း/ပုံစံ-ဒေတာ" (ဒုတိယ တင်သွင်းရန် ခလုတ်) အဖြစ် ကုဒ်လုပ်ထားသည်-
<form action="/action_page_binary.asp" method="post">
<label for="fname">First name:</label>
<input type="text" id="fname"
name="fname"><br><br>
<input type="submit" value="Submit">
<input type="submit" formenctype="multipart/form-data" value="Submit as
Multipart/form-data">
</form>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
formenctype
ဆာဗာသို့တင်ပြသောအခါတွင် ဖောင်ဒေတာကို မည်သို့ကုဒ်လုပ်ရမည်ကို ရည်ညွှန်းချက်တွင် ဖော်ပြသည် (ဖောင်ပုံစံများအတွက် သာ method="post"
)
ရည်ညွှန်းချက်သည်
ဒြပ်စင် ၏ formenctype
အရည်အချင်းကို လွှမ်းမိုးသည် ။enctype
<form>
မှတ်ချက်- attribute formenctype
ကို
type="submit"
နှင့်
type="image"
.
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် attribute ကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးပါသည်။
Attribute | |||||
---|---|---|---|---|---|
formenctype | Yes | 10.0 | Yes | 5.1 | 10.6 |
အထားအသို
<input formenctype="value">
ရည်ညွှန်းတန်ဖိုးများ
Value | Description |
---|---|
application/x-www-form-urlencoded | Default. All characters are encoded before sent (spaces are converted to "+" symbols, and special characters are converted to ASCII HEX values) |
multipart/form-data | This value is necessary if the user will upload a file through the form |
text/plain | Sends data without any encoding at all. Not recommended |
❮ HTML <input> tag