如何为 imagebutton 加上 onmouseover 和 onmouseout 事件 ?
以下为img 加上的 css 及 onmouseover 和 onmouseout 事件如何能为 imagebutton 加上?
img 的属性
<img src= "images/unread.gif " border= "0 " class= "CUEditor_OutColor " onmouseover= "this.className= 'CUEditor_OverColor '; " onmouseout= "this.className= 'CUEditor_OutColor '; " hspace= "2 " vspace= "0 " title= "未读信息 "/>
我想让上述的 class= "CUEditor_OutColor " onmouseover= "this.className= 'CUEditor_OverColor '; " onmouseout= "this.className= 'CUEditor_OutColor '; "
属性为以下 imagebutton 加上 ,
<asp:imagebutton id= "ImageButton1 " runat= "server " ImageUrl= "images\deleteMessage.gif "> </asp:imagebutton>
要加在什么地方呢?
vs.net中 imagebutton 根本就没有 onmouseover 和 onmouseout 的属性啊?
[解决办法]
this.ImageButton1.Attributes.Add( "onmouseover ", "this.className= 'CUEditor_OverColor ' ");this.ImageButton1.Attributes.Add( "onmouseout ", "this.className= 'CUEditor_OutColor ' ' ");