我想把它变灰,可是还可以点,所以我就想干脆让它不可见算了
就是invisible

解决方案 »

  1.   

    页面已经被HTML写出来,SCRIPT只能作用在客户端
    因此如果想让它不可见,只有提交页面重新刷新一次,然后在程序中判断是否画该按纽
      

  2.   

    <HTML><HEAD>
    <META http-equiv=Content-Type content="text/html; charset=unicode"><script language="javascript">
    function hidden_button()
      {
      button2.style.display = "none";
      }
    </script><META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
    <BODY>
    <INPUT id=button1 type=button value=Button name=button1 onclick="hidden_button()">
    <BR><BR>
    <INPUT id=button2 type=button value=Button name=button2>
    </BODY></HTML>
      

  3.   

    <form name=mxh1>
    <input id=mxh style="visibility:hidden">
    <input name=aa type=radio onclick="document.all.mxh.style.visibility='visible'">显示
    <input name=aa type=radio onclick="document.all.mxh.style.visibility='hidden'">隐藏
    </form><script>
    for(var i=0;i<document.mxh1.elements.length;i++)
    {
    if(document.mxh1.elements[i].type=="radio")
    document.mxh1.elements[i].checked=""
    }
    </script>
    <form>
    <INPUT name="cancle" type="button" value="111" style="display:none">
    <INPUT name="ok" onclick="cancle.style.display='block'" type="button" value="显示">
    <INPUT name="ok" onclick="cancle.style.display='none'" type="button" value="隐藏">
    </form>
      

  4.   

    可以用CSS来做啊。在页面上看不到那个BUTTON,但是点击某块区域就会执行某个动作。
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <style type="text/css">
    <!--
    .InvButton {  border: #FFFFFF; background-color: #FFFFFF}
    -->
    </style>
    <script language="JavaScript">
    <!--
    function MM_popupMsg(msg) { //v1.0
      alert(msg);
    }
    //-->
    </script>
    </head><body bgcolor="#FFFFFF" text="#000000">
    <form name="form1" method="post" action="">
      <input type="submit" value="                    " class="InvButton" onClick="MM_popupMsg('Glad to see u :)')">
    </form>
    </body>
    </html>
      

  5.   

    <input type="submit" value="go" DISABLED>