<html>
<body>
<h2>使用 select() 选择星期字段的内容</h2>
星期:<input type="week" id="myWeek" value="2023-W06">
<p>单击按钮可选择星期字段的内容。</p>
<button type="button" onclick="myFunction()">试一试</button>
<script>
function myFunction() {
document.getElementById("myWeek").select();
}
</script>
</body>
</html>