<!DOCTYPE html>
<html>
<body>
Time: <input type="time" id="myTime" step="2">
<p>Click the button to change the value of the step attribute of the time field (seconds interval).</p>
<p><b>Tip:</b> Try the up and down arrows in the time field for seconds before and after you click the button.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("myTime").step = "10";
document.getElementById("demo").innerHTML = "The value of the step attribute was changed from '2' to '10'.";
}
</script>
</body>
</html>