Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/12/2010, 07:07
Avatar de xalupeao
xalupeao
 
Fecha de Ingreso: mayo-2008
Ubicación: Santiago, Chile
Mensajes: 749
Antigüedad: 16 años
Puntos: 12
Como activar un boton si hay un checkbox seleccionado

tengo el siguiente codigo:

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title>Documento sin título</title>
  5. </head>
  6.  
  7. <form id="form1" name="form1" method="get" action="">
  8.   <input name="campos[]" type="checkbox" id="checkbox" value="1" onchange="enviar();"/>
  9.   <label for="checkbox"></label>
  10.   campo 1<br />
  11.   <input name="campos[]" type="checkbox" id="checkbox2" value="2" />
  12.   <label for="checkbox2"></label>
  13.   campo 2<br />
  14.   <input name="campos[]" type="checkbox" id="checkbox3" value="3" />
  15.   <label for="checkbox3"></label>
  16.   campo 3<br />
  17.   <input name="campos[]" type="checkbox" id="checkbox4" value="4" />
  18.   <label for="checkbox4"></label>
  19.   campo 4
  20.   <br />
  21.   <input type="submit" name="button" id="button" disabled value="Enviar" />
  22. </form>
  23. </body>
  24. </html>


lo que necesito es hablitar el boton "button" cuando cualquiera de los checkbox sea marcado.

no son solo 4 checkbox pueden ser x checkbox.

espero que me puedan ayudar, muchas gracias :)
__________________
Hosting en Chile en Silverhost - La solución en Hosting en Chile.