Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/06/2011, 10:51
Avatar de Naahuel
Naahuel
 
Fecha de Ingreso: marzo-2011
Ubicación: localhost
Mensajes: 796
Antigüedad: 13 años, 1 mes
Puntos: 192
Respuesta: opcion cambio

Algo así?
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
  2.   <head>
  3.     <script type="text/javascript">
  4. function cambiar_opcion(combo){
  5.     if(combo.value=='1'){
  6.      document.getElementById('imagen').style.display = 'none';}
  7.     else if(combo.value=='2'){
  8.      document.getElementById('imagen').style.display = 'block';
  9.     }
  10.     }
  11.     </script>
  12.     <title></title>
  13.   </head>
  14.   <body>
  15.     <p>
  16.       <select onchange="cambiar_opcion(this)">
  17.         <option value="1">
  18.           Sólo texto
  19.         </option>
  20.         <option value="2">
  21.           Con imagen
  22.         </option>
  23.       </select>
  24.     </p>
  25.     <p>
  26.       <textarea cols="6" rows="6">
  27. </textarea> <input style="display:none;" id="imagen" name="imagen" type="file">
  28.     </p>
  29.   </body>
  30. </html>
__________________
nahueljose.com.ar