Input Time value Property - Get the time of a time field: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Time

Description

Input Time value Property - Get the time of a time field:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>
Time: <input type="time" id="myTime" value="16:32:55">

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {/*from  w w  w  . java2  s.c o  m*/
    var x = document.getElementById("myTime").value;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials