input button 的 onserverclick 事件

aspx:
 <input id="Button1" runat="server" class="btn2"  onserverclick="Button1_ServerClick"
                                    type
="button" value="关闭" />
aspx.cs:
  protected void Button1_ServerClick(object sender, EventArgs e)
    
{
       
        
if (this.Hidden1.Value.Length > 0)
        
{
            Response.Write(
"<Script>returnValue='ok';window.close();</Script>");
        }

        
else
        
{
            Response.Write(
"<Script>window.close();</Script>");
        }

        
    }

posted on 2007-10-17 11:42  simhare  阅读(2384)  评论(0编辑  收藏  举报

导航