Ver Mensaje Individual
  #2 (permalink)  
Antiguo 31/07/2009, 13:17
Avatar de Legoltaz
Legoltaz
 
Fecha de Ingreso: agosto-2008
Mensajes: 325
Antigüedad: 15 años, 8 meses
Puntos: 6
Respuesta: bloquear campo de texto con javascript

Código HTML:
Ver original
  1. <select onchange="
  2. if(this.options.value == '2') this.form.cajaTexto.setAttribute('disabled','disabled');
  3. else this.form.cajaTexto.removeAttribute('disabled');
  4. ">
  5. <option value="1">Opción 1</option>
  6. <option value="2">Opción 2</option>
  7. <input type="text" name="cajaTexto" />
  8. </form>