<input type=button value=hide/show onclick="with(document.all.panelId.style)display=display=='none'?'':'none'">;

解决方案 »

  1.   

    当然在NET下会有些不同, 若你设置了 PanelId.visible = false; 的话, 则客户端脚本操作失效出错.
      

  2.   

    老兄,说得具体点吧,我以前用的button是服务器端的
      

  3.   

    那就是说不用panel了?这样是不是需要用层了 ?
      

  4.   

    btnDel.Attributes["onclick"] = "with(document.all.panelId.style)display=display=='none'?'':'none'";
      

  5.   

    不要在服务端设置visible=false;
    在html代码里加上style="display:none"
    然后用梅花雪的代码:
    <input type=button value=hide/show onclick="with(document.all.panelId.style)display=display=='none'?'':'none'">;