Gridview 鼠标悬浮光棒效果
生活随笔
收集整理的這篇文章主要介紹了
Gridview 鼠标悬浮光棒效果
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?? 代碼
?1??protected?void?GridView1_RowDataBound(object?sender,?GridViewRowEventArgs?e)?2?????{
?3?
?4??//如果是綁定數據行?
?5?
?6???if(e.Row.RowType?==?DataControlRowType.DataRow)
?7?????{
?8?
?9?//鼠標經過時,行背景色變?
10????????e.Row.Attributes.Add("onmouseover",
11?????????"currentcolor=this.style.backgroundColor;this.style.backgroundColor='#6699ff'");
12?
13?//鼠標移出時,行背景色變?
14????????e.Row.Attributes.Add("onmouseout",?"this.style.backgroundColor=currentcolor");
15?????}
16?
17?????}
18?
19?
?
?
轉載于:https://www.cnblogs.com/xiachufeng/archive/2010/07/08/1773877.html
總結
以上是生活随笔為你收集整理的Gridview 鼠标悬浮光棒效果的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: su室内插件_sketchup模型库+S
- 下一篇: C语言使用scanf_s函数输入的正确姿