Ver Mensaje Individual
  #11 (permalink)  
Antiguo 31/12/2014, 10:59
axelb
 
Fecha de Ingreso: abril-2011
Mensajes: 171
Antigüedad: 13 años, 1 mes
Puntos: 1
Respuesta: Enviar valor de checkbox por url mediante link

He probado así, pero no me funciona...

que esta mal??

Código HTML:
Ver original
  1. function enlace2() {
  2.     var radio= document.frm.b;
  3.     for (var i = 0, l = radio.length, query = []; i < l; i++){
  4.     if (radio[i].checked){
  5.         query.push(radio[i].name + "=" + radio[i].value);
  6.    }
  7. }
  8.  
  9. location.href = "check_modificar.php?" + query.join("&");
  10. }
  11. <form name="frm">
  12. <input type="checkbox" name="b[]" value="Si">Si
  13. <input type="checkbox" name="b[]" value="No" checked>No
  14. </form>
  15. <a href="javascript:enlace2()">Modificar</a>
  16. </body></html>

:/