鼠标划过时整行变色
function overIt(){
var the_obj = event.srcElement;
if(the_obj.tagName.toLowerCase() == "td"){
the_obj=the_obj.parentElement;
the_obj.oBgc=the_obj.currentStyle.backgroundColor; the_obj.oFc=the_obj.currentStyle.color;
the_obj.style.backgroundColor='red';
the_obj.style.color='blue';
the_obj.style.textDecoration='underline';
}
}
function outIt(){
var the_obj = event.srcElement;
if(the_obj.tagName.toLowerCase() == "td"){
the_obj=the_obj.parentElement;
the_obj.style.backgroundColor=the_obj.oBgc;
the_obj.style.color=the_obj.oFc;
the_obj.style.textDecoration='';
}
}
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
aaa | aaa | aaa | aaa |
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
赞 (0)