Javascript examples for DOM HTML Element:Input Time
Input Time defaultValue Property - Get the default value of a time field:
<!DOCTYPE html> <html> <body> Time: <input type="time" id="myTime" value="16:32:55"> <button type="button" onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {// ww w . ja v a2s . co m var x = document.getElementById("myTime").defaultValue; document.getElementById("demo").innerHTML = x; } </script> </body> </html>