<html>
<body>
时间:<input type="time" id="myTime" step=".1">
<p>单击该按钮可更改时间字段的 step 属性值(毫秒间隔)。</p>
<p><b>提示:</b>请在单击按钮前后,尝试在时间字段的毫秒部分中单击向上和向下箭头。</p>
<button onclick="myFunction()">试一试</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("myTime").step = ".050";
document.getElementById("demo").innerHTML = "step 属性的值已从“.1”更改为“.050”。";
}
</script>
</body>
</html>