Javascript examples for DOM HTML Element:Input Time
The type property returns the type of form element time field.
A String, representing the type of form element the time field is
The following code shows how to return which type of form element the time field is:
<!DOCTYPE html> <html> <body> <input type="time" id="myTime"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//from ww w . j ava 2 s . com var x = document.getElementById("myTime").type; document.getElementById("demo").innerHTML = x; } </script> </body> </html>