x
 
<!DOCTYPE html>
<html>
<body>
周和年:
<input type="week" id="myWeek" min="2023-W01" max="2023-W23">
<p>单击该按钮可更改星期字段的 max 属性的值。</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").max = "2023-W35";
  document.getElementById("demo").innerHTML = "max 属性的值已从“2023-W23”更改为“2023-W35”。";
}
</script>
</body>
</html>