HTML DOM Input Time Object
Input Time Object
Input Time object သည် type="time" ဖြင့် HTML <input> element ကို ကိုယ်စားပြုသည်။
မှတ်ချက်- <input type="time"> IE11 နှင့် အစောပိုင်းတွင် သင့်လျော်သော အချိန်အကွက်အဖြစ် မပြပါ။
Input Time Object ကို ဝင်သုံးပါ။
getElementById(): ကိုအသုံးပြုခြင်းဖြင့် type="time" ဖြင့် <input> element ကို ဝင်ရောက်ကြည့်ရှုနိုင်ပါသည်။
ဥပမာ
var x = document.getElementById("myTime");
အကြံပြုချက်- ဖောင် တစ်ခု၏ အစိတ်အပိုင်းများ စုစည်းမှု မှတစ်ဆင့် ရှာဖွေခြင်းဖြင့် <input type="time">ကိုလည်း သင်ဝင်ရောက်ကြည့်ရှု နိုင်ပါသည်။
Input Time Object ဖန်တီးပါ။
document.createElement() နည်းလမ်းကို အသုံးပြု၍ type="time" ဖြင့် <input> element တစ်ခုကို ဖန်တီးနိုင်သည်-
ဥပမာ
var x = document.createElement("INPUT");
x.setAttribute("type", "time");
Input Time Object Properties
Property | Description |
---|---|
autocomplete | Sets or returns the value of the autocomplete attribute of a time field |
autofocus | Sets or returns whether a time field should automatically get focus when the page loads |
defaultValue | Sets or returns the default value of a time field |
disabled | Sets or returns whether a time field is disabled, or not |
form | Returns a reference to the form that contains the time field |
list | Returns a reference to the datalist that contains the time field |
max | Sets or returns the value of the max attribute of the time field |
min | Sets or returns the value of the min attribute of the time field |
name | Sets or returns the value of the name attribute of a time field |
readOnly | Sets or returns whether the time field is read-only, or not |
required | Sets or returns whether the time field must be filled out before submitting a form |
step | Sets or returns the value of the step attribute of the time field |
type | Returns which type of form element the time field is |
value | Sets or returns the value of the value attribute of a time field |
Input Time Object Methods
Method | Description |
---|---|
select() | Selects the content of a time text field |
stepDown() | Decrements the value of the time field by a specified number |
stepUp() | Increments the value of the time field by a specified number |
စံသတ်မှတ်ချက်များနှင့် အစီအစဉ်များ
Input Time object သည် စံ ဂုဏ်သတ္တိများ နှင့် အဖြစ်အပျက်များ ကို ပံ့ပိုး ပေးပါသည်။
ဆက်စပ်စာမျက်နှာများ
HTML သင်ခန်းစာ- HTML ပုံစံများ
HTML ရည်ညွှန်း- HTML <input> တဂ်
HTML ရည်ညွှန်း- HTML <input> type attribute