以我的方式,我使用此代碼突出顯示了我的GridView行。用Javascript恢復行CssStyle?
function onGridViewRowSelected(rowIdx) {
var selRow = getSelectedRow(rowIdx);
if (curSelRow != null) {
curSelRow.style.backgroundColor = 'transparent';
} if (null != selRow) {
curSelRow = selRow;
curSelRow.style.backgroundColor = '#ababab';
}
clearTimeout(rowHighLightTimeOut);
}
當我在我的GridView的碼定義AlternateRowCssStyle工作,但清除所有定義的備用CssStyle在GridView時的onmouseover。爲了防止這種情況,我需要捕獲當前的單元格樣式,並在onmouse時再次加載它? 我該怎麼做? 感謝
感謝您的及時答覆。爲失誤抱歉。我編輯了代碼。此代碼工作,但需要恢復我的備用行css,以防止爲我的所有行應用「透明」背景。 –