HTML DOM Input DatetimeLocal Obheto
- Previous Page <input> datetime
- Next Page <input> email
Datetime Local object
Ang Datetime Local object ay isang bagong object sa HTML5.
Ang Datetime Local object ay naglalaman ng HTML <colgroup> elemento.
Komentaryo:Ang Internet Explorer o Firefox ay hindi sumusuporta sa elemento <input type="datetime-local">.
Pagsasakop sa Datetime Local object
Maaari kang makapasok sa <datetime-local> elemento sa pamamagitan ng paggamit ng getElementById():
var x = document.getElementById("myLocalDate");
Mga paalala:Maaari din kang magpasukang sa form sa pamamagitan ng pagpasukan ng: Koleksyon ng elementsPara makapasok sa Input Date object.
Buwan ng paglikha ng Datetime Local
Maaari mong gumawa ng <datetime-local> elemento sa pamamagitan ng paggamit ng method na document.createElement():
var x = document.createElement("INPUT"); x.setAttribute("type", "datetime-local");
Datetime Local Object Properties
Properties | Description |
---|---|
autocomplete | Set or return the value of the local time field's autocomplete attribute. |
autofocus | Set or return whether the local time field should automatically focus after the page is loaded. |
defaultValue | Set or return the default value of the local time field. |
disabled | Set or return whether the local time field is disabled. |
form | Return a reference to the form that contains the local time field. |
list | Return a reference to the datalist that contains the local time field. |
max | Set or return the value of the local time field's max attribute. |
min | Set or return the value of the local time field's min attribute. |
name | Set or return the value of the local time field's name attribute. |
readOnly | Set or return whether the local time field is read-only. |
required | Set or return whether the local time field must be filled out before submitting the form. |
step | Set or return the value of the local time field's step attribute. |
type | Return the form element type of the local time field. |
value | Set or return the value of the local time field's value attribute. |
Input DatetimeLocal Object Method
Method | Description |
---|---|
stepDown() | Decrement the value of the datetime field by a specified number. |
stepUp() | Increment the value of the datetime field by a specified number. |
Standard Properties and Events
Datetime Local Object Supports StandardPropertiesAtEvents.
Related Pages
HTML Tutorial:HTML Forms
HTML Reference Manual:HTML <input> Tag
HTML Reference Manual:HTML <input> type Attribute
- Previous Page <input> datetime
- Next Page <input> email