<html>
<head>
    <title>無題</title>
    <script>
        function testDisable(btn){
            btn.disabled = true;
        }
    </script>
</head>
<body>
    <input id="Button1" type="button" value="button" onclick = "btnDisabled(this)"/>
</body>
</html>

解决方案 »

  1.   

    上面那个错了,这个才是
    <html>
    <head>
        <title>無題</title>
        <script>
            function btnDisable(btn){
                btn.disabled = true;
            }
        </script>
    </head>
    <body>
        <input id="Button1" type="button" value="button" onclick = "btnDisable(this)"/>
    </body>
    </html>
      

  2.   

    1行
    <input type="button" value="button" onclick="this.disabled=true" />
      

  3.   

    <input type="button" value="button" onclick="this.disabled=true" />
    这个,3楼的方法,就非常不错.
      

  4.   

    但放到JS方法里会报错。如:
    function btn(btn){
    btn.disabled = true; }
    会报错在HTML页面不会!
      

  5.   

    <input type="button" value="button" onclick="javascript:this.disabled=true;" />