x
 
<!DOCTYPE html>
<html>
<body>
<input type="datetime-local" id="myLocalDate">
<p>单击该按钮可禁用本地日期时间字段。</p>
<button onclick="myFunction()">试一试</button>
<p><b>注意:</b>type="datetime-local" 的输入元素在 Firefox 中不会显示为任何日期时间字段/日历。</p>
<script>
function myFunction() {
  document.getElementById("myLocalDate").disabled = true;
}
</script>
</body>
</html>