鼠标悬浮到单元格上使字体改变颜色高亮显示的方法有么
鼠标悬浮到单元格上使字体改变颜色高亮显示的方法有么本帖最后由 豪~豪 于 2024-5-16 09:54 编辑
var myDiv = document.querySelector("#r3c16p_div");
myDiv.addEventListener('mouseenter', function(event) {
document.querySelector("#r3c16p").style.color = "rgb(255 0 0)";
});
// 绑定 mouseleave 事件
myDiv.addEventListener('mouseleave', function(event) {
document.querySelector("#r3c16p").style.color = "rgb(0 0 0)";
});
豪~豪 发表于 2024-5-16 09:44
感谢大佬:i0tw: 感谢各位大佬的支持~
后边有问题呢欢迎您继续发帖交流:i0tw2:
页:
[1]