HTML <input> placeholder Attribute
ဥပမာ
နေရာယူထားသော စာသားပါသော တယ်လီဖုန်းထည့်သွင်းမှုအကွက်
<form action="/action_page.php">
<label for="phone">Enter a phone number:</label><br><br>
<input type="tel" id="phone" name="phone" placeholder="123-45-678"
pattern="[0-9]{3}-[0-9]{2}-[0-9]{3}"><br><br>
<small>Format:
123-45-678</small><br><br>
<input type="submit">
</form>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ရည်ညွှန်းချက်သည် ထည့်သွင်းအကွက်တစ်ခု၏ မျှော် placeholder
မှန်းတန်ဖိုးကို ဖော်ပြသည့် အတိုကောက် အရိပ်အမြွက်ကို ဖော်ပြသည် (ဥပမာ- နမူနာတန်ဖိုး သို့မဟုတ် မျှော်မှန်းဖော်မတ်၏ အတိုကောက်ဖော်ပြချက်)။
အသုံးပြုသူသည် တန်ဖိုးတစ်ခုမဝင်မီ အတိုချုံး အရိပ်အမြွက်ကို ထည့်သွင်းအကွက်တွင် ပြသထားသည်။
မှတ်ချက်- ရည်ညွှန်းချက်သည် အောက်ပါ placeholder
ထည့်သွင်းမှုအမျိုးအစားများနှင့် အလုပ်လုပ်သည်- စာသား၊ ရှာဖွေမှု၊ url၊ ဖုန်း၊ အီးမေးလ်၊ နှင့် စကားဝှက်။
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် attribute ကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးပါသည်။
Attribute | |||||
---|---|---|---|---|---|
placeholder | 10.0 | 10.0 | 4.0 | 5.0 | 11.0 |
အထားအသို
<input placeholder="text">
ရည်ညွှန်းတန်ဖိုးများ
Value | Description |
---|---|
text | Specifies a short hint that describes the expected value of the input field |
❮ HTML <input> tag