gridview 滑鼠經過變色函式

2022-02-01 15:54:56 字數 350 閱讀 5754

/我們先設定當滑鼠上去的時候他的背景色改變

e.row.attributes.add("onmouseover", "c=this.style.backgroundcolor;this.style.backgroundcolor='#ff6699'");

//下面我們再設定當滑鼠離開後背景色再還原

e.row.attributes.add("onmouseout", "this.style.backgroundcolor=c;");

//為特定的數改變行樣式這也是在這個事件裡面,因為這個事件是在資料被繫結的時候執行的

for (int i = 0; i < gridview1.rows.count; i++)

CSS DIV實現滑鼠經過背景變色

實現滑鼠經過背景變色的方法有很多,今天我們介紹的是用css div實現的方法。方法一以下為引用的內容 div hover 解釋 滑鼠經過id為div的元素時背景變色 ie6.0 firefox2.0 opera 9.23都不行 方法二以下為引用的內容 方法三 以下為引用的內容 哈哈哈哈哈 的標籤是可...

滑鼠經過超連結文字變色

1 第一種方法 a href style text decoration none onmouseover j ascript this.style.color red onmouseout j ascript this.style.color black 測試文字 a 2 第二種方法 css a ...

擴充套件GridView滑鼠經過行的顏色

在gridview中加個行的顏色,這樣子我們就不用每次都去寫這一些 了,呵呵,又少做一些工作,在個這要是在gridview中重寫rowdatabound,在資料繫結時寫上這樣 我們可以在屬性中的擴充套件中,選擇所需的顏色.code using system using system.collecti...