按钮添加JaveScript代码
1
<asp:Button ID="Button1" runat="server" Height="28px" Text="点我" Width="93px"
2
onmouseover="c=this.style.backgroundColor; this.style.backgroundColor=\'#00ff99\'; this.style.width=\'150\';"
3
onmouseout="this.style.backgroundColor=c;this.style.width=\'93\';" Font-Bold="true"/>
2
3
按钮添加属性
按钮CommandName属性
PS:三个按钮同时触发button2_Click事件,根据事件惩罚者((Button)sender)的CommandName来判断