x
 
<!DOCTYPE html>
<html>
<body>
<button id="myBtn">我的按钮</button>
<p>单击下面的按钮可禁用上面的按钮。</p>
<button onclick="myFunction()">试一试</button>
<script>
function myFunction() {
  document.getElementById("myBtn").disabled = true;
}
</script>
</body>
</html>