x
 
<!DOCTYPE html>
<html>
<body>
周和年:
<input type="week" id="myWeek" min="2023-W01" max="2023-W35">
<p>单击该按钮可更改星期字段的 min 属性值。</p>
<button onclick="myFunction()">试一试</button>
<p><b>注意:</b>Internet Explorer 或 Firefox 不支持带有 type="week" 的输入元素。</p>
<p id="demo"></p>
<script>
function myFunction() {
  var x = document.getElementById("myWeek").min = "2023-W05";
  document.getElementById("demo").innerHTML = "min 属性的值已从“2023-W01”更改为“2023-W05”。";
}
</script>
</body>
</html>