Kilden fra
www.itbutikken.dk siger at du skal smide følgende kode i din head:
<script language=\"javascript\">
function rowOver(){
lmnt = window.event.srcElement;
if (lmnt.tagName.toUpperCase() == \'TABLE\')
return;
while (lmnt.tagName.toUpperCase() !=\'TR\')
lmnt = lmnt.parentElement;
lmnt.style.background = \"#d4dcdc\";
}
function rowOut(){
lmnt = window.event.srcElement;
if (lmnt.tagName.toUpperCase() == \'TABLE\')
return;
while (lmnt.tagName.toUpperCase() !=\'TR\')
lmnt = lmnt.parentElement;
lmnt.style.background =\"#e4ecec\";
}
function rowOverTD(){
lmnt = window.event.srcElement;
if (lmnt.tagName.toUpperCase() == \'TABLE\')
return;
while (lmnt.tagName.toUpperCase() !=\'TD\')
lmnt = lmnt.parentElement;
lmnt.style.background = \"#d4dcdc\";
}
function rowOutTD(){
lmnt = window.event.srcElement;
if (lmnt.tagName.toUpperCase() == \'TABLE\')
return;
while (lmnt.tagName.toUpperCase() !=\'TD\')
lmnt = lmnt.parentElement;
lmnt.style.background =\"#e4ecec\";
}
</script>
Og denne kode i hver table:
<table onmouseover=\"rowOver();\" onmouseout=\"rowOut();\" >