x
 
<!DOCTYPE html>
<html>
<body>
周和年:<input type="week" id="myWeek">
<p>单击按钮为星期字段设置周和年。</p>
<button onclick="myFunction()">试一试</button>
<p><b>注意:</b>Internet Explorer 或 Firefox 不支持带有 type="week" 的输入元素。</p>
<p id="demo"></p>
<script>
function myFunction() {
  document.getElementById("myWeek").value = "2023-W06";
}
</script>
</body>
</html>