$('#<%=AllEvent.ClientID%> tr:not(:has("th"))').hover(function () {
$bg = $(this).css('background-color');
$(this).css('background-color', '#ffc4c6');
},
function () {
$(this).css('background-color', $bg);
});
$bg = $(this).css('background-color');
$(this).css('background-color', '#ffc4c6');
},
function () {
$(this).css('background-color', $bg);
});
鼠标悬停改变表格背景色
本文介绍了一段使用jQuery实现的功能,当鼠标悬停在表格的特定元素上时,会改变这些元素的背景颜色。该功能适用于带有特定ID标识的表格,并且能够记住原始背景色以便在鼠标移开时恢复。
145

被折叠的 条评论
为什么被折叠?



