OnClientClick:触发浏览器端的响应,OnClick触发服务器端响应;

在服务器aspx.cs脚本中设置按钮属性: this.btnTest.Attributes["OnClick"]="alert('hello');" 等同于OnClientClick。

04-29 21:09