![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
30/10/2008, 12:46
|
![Avatar de the_web_saint](http://static.forosdelweb.com/customavatars/avatar237271_3.gif) | | | Fecha de Ingreso: mayo-2008 Ubicación: localhost/tierra/america/panama
Mensajes: 1.229
Antigüedad: 16 años, 9 meses Puntos: 43 | |
Respuesta: combo and hide Cita: No se si entendi bien, pero creo que esto te puede ayudar.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script>
function mostrarMSG2(combo)
{
total = combo.options.length;
for(i=0; i<total; i++)
{
if (combo.options[i].selected)
{
document.getElementById('mensaje').innerHTML=combo .options[i].value;
}
}
}
</script>
</head>
<body>
<form>
<select id="combo" onchange="mostrarMSG2(this)">
<option value="mensaje 1">Valor 1</option>
<option value="mensaje 2">Valor 2</option>
<option value="mensaje 3">Valor 3</option>
<option value="mensaje 4">Valor 4</option>
</select>
</form>
<div id="mensaje"></div>
</body>
</html>
__________________ ..::The Saint::..
El pesimista se queja del viento; el optimista espera que cambie; el realista ajusta las velas. |