Ver Mensaje Individual
  #5 (permalink)  
Antiguo 10/08/2005, 19:41
pentiumonce
 
Fecha de Ingreso: octubre-2004
Mensajes: 82
Antigüedad: 19 años, 11 meses
Puntos: 1
Modificado

El código lo modifique con respecto del RADIO pero con tres opciones, basado en el ejemplo de occiso por supuesto, lo pongo por si a alguien le sirve.

Saludos.

<html>
<head>
<title> New Document </title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<STYLE type="text/css">
<!--
.estilouno{background-color:green;}
.estilodos{background-color:red;}
.estilotres{background-color:beige;}
-->
</STYLE>
<script language="javascript">
<!--
function nombre(obj){
if (obj==1)
{
document.getElementById("tarea").className="estilo uno";
return (1);
}
if (obj==2)
{
document.getElementById("tarea").className="estilo dos";
return (2);
}
if (obj==3)
{
document.getElementById("tarea").className="estilo tres";
return (3);
}
}
//-->
</script>
</head>
<body>
<input type="radio" name="radio" id="radio" value="1" onclick="nombre(1)">Radio1</input>
<input type="radio" name="radio" id="radio" value="2" onclick="nombre(2)">radio2</input>
<input type="radio" name="radio" id="radio" value="2" onclick="nombre(3)">radio3</input>
<textarea name="tarea" id="tarea" rows="20" cols="10">precioso</textarea>
</body>
</html>