x
 
<!DOCTYPE html>
<html>
<body>
时间:<input type="time" id="myTime" step="5">
<p>单击该按钮可显示时间字段(秒间隔)的 step 属性的值。</p>
<button onclick="myFunction()">试一试</button>
<p id="demo"></p>
<script>
function myFunction() {
  var x = document.getElementById("myTime").step;
  document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>