Ver Mensaje Individual
  #5 (permalink)  
Antiguo 03/04/2007, 13:12
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años
Puntos: 772
Re: Zona activa de un boton!!

Ahora he tenido un poco de tiempo y he tecleado algunas líneas de código:

Código PHP:
<html>
<
head>
<
script type="text/javascript">
var 
activo null;
function 
marcar(obj) {
  
obj.style.background 'green';
  if (
activoactivo.style.background 'red';
  
activo obj;
}
</script>
</head>
<body>
<input type="button" style="background:red" onclick="marcar(this)" />
<input type="button" style="background:red" onclick="marcar(this)" />
<input type="button" style="background:red" onclick="marcar(this)" />
</body>
</html> 
Saludos,