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

HTML DOM Input Time type property

Input Time type property

Input Time Object Reference Input Time Object

Example

Return the form element type of the time field:

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

x Output value:

time

Try it »


Definition and Usage

The type property returns the form type of the time field.

Note: In the example above, Opera, Chrome and Safari return "time", while Internet Explorer and Firefox return "text".


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the type property

Note: Internet Explorer or Firefox browsers do not support HTML using the type="time" attribute .


Syntax

timeObject

.type

Technical Details

Return Value: String, representing the form element type of the time field.

Input Time Object Reference Input Time Object