让按钮变灰色,不可用

 <html>
<head>
<title>让按钮变灰色,不可用</title>
</head>
<script>
  function submit(){
  document.all.onload.disabled = "true";
  document.all.goback.disabled = "true";
  }
  
  function onloadto(){
  document.all.submit.disabled = "true";
  document.all.goback.disabled = "true";
  }
  function goback(){
  document.all.onload.disabled = "true";
  document.all.submit.disabled = "true";
  }
</script>
</body>
  <input type="button" name="submit" value="提交" onclick="return submit();"/>
  <input type="button" name="onload" value="加载" onclick="return onloadto();"/>
  <input type="button" name="goback" value="返回" onclick="return goback();"/>
</body>
</html>

你可能感兴趣的:(function,input,button)