try
L.Attributes["onclick"]="javascript:this.style.visible='false';";or 
L.Attributes["onclick"]="javascript:myLabel.style.display='none';";

解决方案 »

  1.   

    Label L;
    L=(Label)this.FindControl("myLabel");
    L.Attributes["onclick"]="javascript:document.all.myLabel.style.visibility='hidden';";
      

  2.   

    不如在page_load()
    {
    this.myLabel.Attributes["onclick"]="javascript:document.ll.myLabel.style.display='none';";
    }
      

  3.   

    各位高手: 如果浏览器不同,是不是这些就不同了呢?
     比如 net_lover(孟子E章) ( )的,在我这事没有visibility属性的波。
      

  4.   

    放在Page_Load中:myLabel1.Attributes.Add("onclick","document.all."+myLabel.ClientID+".style.visibility=\'hidden\';");
      

  5.   

    <asp:label id="YourHome" runat="server" onclick="this.style.display='none'" Text='hello world' />>>>如果浏览器不同
    http://www.wdvl.com/Authoring/DHTML/CB/index.html