代码如下:
<head runat="server">
    <title></title>
    <script type="text/javascript" language="javascript">
        function change() {            document.getElementById("Button1").Visible = false;
        }
</script></head>
<body>
    <form id="form1" runat="server">
    <div id="yincang">
        <asp:TextBox ID="TextBox1" runat="server" onblur="change()"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="Button" />
   </div>
    </form>
</body>

解决方案 »

  1.   

    function change() {document.getElementById("Button1").style.display="none";
    }
      

  2.   

    ++
    style.display="none"; 显示就是'block' 。 
      

  3.   

    我不太懂这个,如果我有母版页和内容页,我的这个javascript写在哪,写在母版页的<head>里还是写在内容页里,我这些控件都是内容页的
      

  4.   

    脚本可以使用RegisterClientScriptInclude来注册。 http://www.google.com.hk/search?q=asp.net+RegisterClientScriptInclude&hl=zh-CN&safe=strict&prmd=ivnsfd&source=lnt&tbs=lr:lang_1zh-CN|lang_1zh-TW&lr=lang_zh-CN|lang_zh-TW&sa=X&ei=xccGTqVt6vOYBZuP4NEN&ved=0CAcQpwUoAQ&biw=1022&bih=539
      

  5.   

    document.getElementById("Button1").Visible = false;
    --------------------------------------------------------------------
    document.getElementById("Button1").style.display= none;
      

  6.   

    JS对操作服务器端控件,最好不要直接写ID,因为服务器ID,到客户端可能会解析成其他的ID,一般上要这样写:
        function HideButton(){
           document.getElementById("<%=服务器控件ID.ClientID %>").style.display="none";
        }