input button 的 onserverclick 事件
aspx:
<input id="Button1" runat="server" class="btn2" onserverclick="Button1_ServerClick"
type="button" value="关闭" />
aspx.cs:type="button" value="关闭" />
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>");
}
}
{
if (this.Hidden1.Value.Length > 0)
{
Response.Write("<Script>returnValue='ok';window.close();</Script>");
}
else
{
Response.Write("<Script>window.close();</Script>");
}
}