Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Input DatetimeLocal type attribute

Input DatetimeLocal type property

Input DatetimeLocal Object Reference Input DatetimeLocal Object

Example

Returns the form element type of the local datetime field:

var x = document.getElementById("myLocalDate").type;

x The output result is:

datetime-local

Try it »


Definition and Usage

The type property returns the form type of the local datetime field.

Note: In the example above, Internet Explorer and Firefox return "text" instead of "datetime-local".


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the type attribute.

**Note:** Internet Explorer or Firefox browser does not support .


Syntax

datetimelocalObject

.type

Technical Details

Return Value: String representing the form element type of the local datetime field

Input DatetimeLocal Object Reference Input DatetimeLocal Object