Input Time step Property - Get the legal number intervals for seconds in a time field: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Time

Description

Input Time step Property - Get the legal number intervals for seconds in a time field:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>
Time: <input type="time" id="myTime" step="5">

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

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

<script>
function myFunction() {/*from   w  ww. j  a  v  a  2s.  c  o  m*/
    var x = document.getElementById("myTime").step;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials