1.
<form name=fm method="POST" action="/"><p>按钮变灰</p>name: <input type="text" name="name"/><input type="button" value="提交" οnclick="javascript:{this.disabled=true;document.fm.submit();}"></form>
2.
<form name=fm method="POST" action="/" > <input type="submit" name="Submit" value="提交" id="submitId" οnclick="submit();"> </form> <script language="javascript"> function submit() { var submitId=document.getElementById('submitId'); submitId.disabled=true; document.fm.submit(); setTimeout("submitId.disabled=false;",3000); //代码核心在这里,3秒还原按钮代码 } </script>