HTML autofocus ရည်ညွှန်းချက်
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
attribute သည်
autofocus
boolean attribute တစ်ခုဖြစ်သည်။
ရှိနေသောအခါ၊ စာမျက်နှာကိုဖွင့်သည့်အခါ ဒြပ်စင်သည် အလိုအလျောက် အာရုံရသင့်သည်ဟု သတ်မှတ်သည်။
တွေပေါ့။
ရည်ညွှန်းချက်ကို အောက်ပါ
autofocus
ဒြပ်စင်များတွင် အသုံးပြုနိုင်ပါသည်။
ဒြပ်စင် | ဂုဏ်ရည် |
---|---|
<ခလုတ်> | အလိုအလျောက်အာရုံစူးစိုက်မှု |
<input> | အလိုအလျောက်အာရုံစူးစိုက်မှု |
<select> | အလိုအလျောက်အာရုံစူးစိုက်မှု |
<textarea> | အလိုအလျောက်အာရုံစူးစိုက်မှု |
ဥပမာများ
ခလုတ်ဥပမာ
အော်တို ဆုံချက်ပါသော ခလုတ်
<button type="button" autofocus>Click Me!</button>
ထည့်သွင်းဥပမာ
စာမျက်နှာကိုဖွင့်သည့်အခါ "ပထမအမည်" ထည့်သွင်းမှုအကွက်ကို အလိုအလျောက် အာရုံစူးစိုက်နိုင်စေသည်-
<form action="/action_page.php">
First name: <input type="text" name="fname" autofocus><br>
Last name: <input type="text" name="lname"><br>
<input type="submit">
</form>
Textarea ဥပမာ
အလိုအလျောက် အာရုံစူးစိုက်မှုရှိသော စာသားဧရိယာ-
<textarea autofocus>
At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>
Browser ပံ့ပိုးမှု
autofocus
ရည်ညွှန်းချက်တွင် ဒြပ်စင်တစ်ခုစီအတွက် အောက်ပါဘရောက်ဆာ ပံ့ပိုးမှုပါရှိသည် ။
Element | |||||
---|---|---|---|---|---|
form | 5.0 | 10.0 | 4.0 | 5.0 | 9.6 |
input | 5.0 | 10.0 | 4.0 | 5.0 | 9.6 |
textarea | Yes | 10.0 | 4.0 | Yes | Yes |