Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/04/2002, 14:28
bet
 
Fecha de Ingreso: febrero-2001
Mensajes: 292
Antigüedad: 23 años, 2 meses
Puntos: 0
Re: Cambiar estilo dinamicamente

Código:
<html>
<head>
<title> New Document </title>
<style type="text/css">
	.c1 {background-color:red; border:1px solid blue}
	.c2 {background-color:blue; border:1px solid red}
</style>

<script language="JavaScript">
<!--
function cambio(item,bg){
	item.style.backgroundColor = bg;
	}
//-->
</script>
</head>

<body bgcolor="#FFFFFF">
<table width="50%" border=1>
<tr>
	<td class="c1" onMouseOver="cambio(this,'blue');" onMouseOut="cambio(this,'red');"> 
		Campo de una tabla con cambio</td>
	<td class="c2"> este es un campo común</td>
</tr>
</table>
</body>
</html>
<hr noshade size=1><img src="http://www.gograph.com/Images-8712/ClipArt/cat03.gif" height="50" border=0 align="absmiddle"> <font size="2" face="verdana" color="#000000">bet[/CODE]