ciao a tutti.
ho fatto questo script per evidenziare le righe di una tabella contenuta in un dato DIV.
il mio problema è che vorrei associare all'evento onmouseout il nome della classe che la riga evidenziata aveva in origine...come faccio a ricavare ed associare questod ato?
ho provato:
TagTr.item(i).onmouseout = function()
{
this.className = TagTr.item(i).className
}
ma naturalmente non funziona
codice:
window.onload = function()
{
var TagDiv = document.getElementsByTagName('DIV')
for (var i = 0; i < TagDiv.length; i++)
{
if (TagDiv.item(i).className == "placeholder" )
{
var TagTable = TagDiv.item(i).getElementsByTagName('TABLE')
for (var i = 0; i < TagTable.length; i++)
{
var TagTr = document.getElementsByTagName('TR')
for (var i = 0; i < TagTr.length; i++)
{
TagTr.item(i).onmouseover = function()
{
this.className = 'TR_hover'
}
TagTr.item(i).onmouseout = function()
{
this.className = ''
}
}
}
return;
}
}
}