Input DatetimeLocal type property
Definitie en gebruik
type
De property retourneert het type van het lokale datum- en tijdfunctieformulier.
Opmerking:In het bovenstaande voorbeeld retourneren Internet Explorer en Firefox "text
", in plaats van "datetime-local
"。
Voorbeeld
De lokale datum- en tijdfunctie retourneert het type van het formulierelement:
var x = document.getElementById("myLocalDate").type;
语法
datetimelocalObject.type
Technical details
Return value: | A string value indicating the type of form element to which the local date-time field belongs. |
---|
Browser support
The numbers in the table indicate the first browser version that fully supports this property.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | Support | Support |
Note:The <input type="datetime-local"> element does not display any date-time field/calendar in Firefox.