<html>
<body>
<h1>使用 select() 选择时间字段的内容</h1>
时间:<input type="time" id="myTime" value="06:45:30">
<p>单击按钮可选择时间字段的内容。</p>
<button type="button" onclick="myFunction()">试一试</button>
<script>
function myFunction() {
document.getElementById("myTime").select();
}
</script>
</body>
</html>