
25/06/2004, 02:34
|
 | Moderador | | Fecha de Ingreso: abril-2002 Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años, 11 meses Puntos: 1284 | |
Hola chusete:
Prueba esto:
Código:
x = document.getElementById("tabla");
for (var i = 0; i < x.rows.length; i ++) {
x.rows[i].style.cursor = "pointer";
x.rows[i].style.backgroundColor = (i % 2 == 0) ? "red" : "blue";
x.rows[i].onmouseover = (i % 2 == 0) ?
function() {this.style.backgroundColor = 'yellow';}:
function() {this.style.backgroundColor = 'lime';};
x.rows[i].onmouseout = (i % 2 == 0) ?
function() {this.style.backgroundColor = 'red';}:
function() {this.style.backgroundColor = 'blue';};
x.rows[i].onclick = (i % 2 == 0) ?
function() {location.href = 'destino1';}:
function() {location.href = 'destino2';};
}
Saludos
__________________ Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo |