|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Jun 2005
Città: CH
Messaggi: 1058
|
MouseOver Tabella in JavaScript
Ciao a tutti, allora dovrei cambiare il background di una cella (che è in una tabella) con il pasaggio del mouse.
Ciau .... <table width="600" height="400" border="1" class="tabella"> <tr> <td id="1" height="50" width="100" onMouseOver="over();">???</td> ... |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Feb 2005
Città: Roma
Messaggi: 414
|
Probabilmente ti basta fare solo questo
<table width="600" height="400" border="1" class="tabella"> <tr> <td id="1" height="50" width="100" onMouseOver="over(this);">???</td> ma dovrei vedere il codice javscript della funzione |
|
|
|
|
|
#3 | |
|
Senior Member
Iscritto dal: Jun 2005
Città: CH
Messaggi: 1058
|
Quote:
e quello il probblema se me lo trovi mi fai un favore |
|
|
|
|
|
|
#4 | |
|
Senior Member
Iscritto dal: Jun 2005
Città: CH
Messaggi: 1058
|
Quote:
|
|
|
|
|
|
|
#5 |
|
Senior Member
Iscritto dal: Nov 2003
Messaggi: 980
|
Con una ricerca su google ho trovato:
Codice:
<script type="text/javascript">
<!--
function setPointer(theRow, thePointerColor)
{
if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
return false;
}
if (typeof(document.getElementsByTagName) != 'undefined') {
var theCells = theRow.getElementsByTagName('td');
}
else if (typeof(theRow.cells) != 'undefined') {
var theCells = theRow.cells;
}
else {
return false;
}
var rowCellsCnt = theCells.length;
for (var c = 0; c < rowCellsCnt; c++) {
theCells[c].style.backgroundColor = thePointerColor;
}
return true;
} // end of the 'setPointer()' function
//-->
</script>
Codice:
<td style="background-color:#cccccc" onMouseOver="setPointer(this, '#ffffff');" onMouseOut="setPointer(this, '#cccccc');">???</td> Codice:
<td style="background-color:#cccccc" onmouseover="style.backgroundColor='#ffffff;" onmouseout="style.backgroundColor='#cccccc'"> Ultima modifica di kk3z : 08-02-2006 alle 18:04. |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 02:47.



















