table
table
{
border-top:1px solid black;
border-left:1px solid black;
cursor:default;
}
td
{
border-bottom:1px solid black;
border-right:1px solid black;
height:23px;
}
function change(el)
{
var x = el.rowIndex;
el.style.backgroundColor = ++d[x]%2 ? "#CCCCFF" : "#E1E9FD";
}
function out(el)
{
var x = el.rowIndex;
if (d[x]%2==0) el.style.backgroundColor = "";
}
function over(el)
{
var x = el.rowIndex;
if (d[x]%2==0) el.style.backgroundColor = "#E1E9FD";
}
one | two | three | four |
效果如下: