Ver Mensaje Individual
  #3 (permalink)  
Antiguo 07/02/2011, 16:34
Avatar de _cronos2
_cronos2
Colaborador
 
Fecha de Ingreso: junio-2010
Mensajes: 2.062
Antigüedad: 13 años, 11 meses
Puntos: 310
Respuesta: Activar o desactivar javascript con checkbox?

Cita:
Iniciado por raxper Ver Mensaje
Código Javascript:
Ver original
  1. function detener(valor){if (valor == true){SE1.disabled = true;}else {SE1.disabled = false;}}

<input type="checkbox" onclick="detener(this.checked);"/> saludos
Más sencillo:
Código HTML:
Ver original
  1. <input type="checkbox" onclick="this.form['SE1'].disabled = !this.checked;"/>
Saludos (:
__________________
" Getting older’s not been on my plans
but it’s never late, it’s never late enough for me to stay. "
Cigarettes - Russian Red