Input DatetimeLocal step Property - Get the legal number intervals for seconds in a local date field: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Datetime Local

Description

Input DatetimeLocal step Property - Get the legal number intervals for seconds in a local date field:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>
Date: <input type="datetime-local" id="myLocalDate" step="5">

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

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

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

Related Tutorials