| |||
Re: Checkall para todos Algo así te puede servir: <pre> <html> <head> <title> Marcar Todos </title> <script language="JavaScript"> <!-- function marcarTodos(){ if (document.forms[ 0 ].todos.checked){ for (i=0;i<document.forms[ 0 ].length;i++){ if ((document.forms[0].elements[ i ].name) == "clt"){ document.forms[0].elements[ i ].checked = true; } } } else { for (i=0;i<document.forms[ 0 ].length;i++){ if ((document.forms[ 0 ].elements[ i ].name) == "clt"){ document.forms[ 0 ].elements[ i ].checked = false; } } } } //--> </script> </head> <body bgcolor="#FFFFFF"> <form method=post action=""> Marcar todos <input type="checkbox" name="todos" onClick="marcarTodos();"><br>&l t;br> * <input type="checkbox" name="clt"> <br> * <input type="checkbox" name="clt"> <br> * <input type="checkbox" name="clt"> <br> * <input type="checkbox" name="clt"> <br> * <input type="checkbox" name="clt"> <br> </form> </body> </html> </pre> Aclaración: donde dice [ 0 ] y [ i ], no te olvides de sacarle los espacios <hr noshade size=1><img src="http://www.gograph.com/Images-8712/ClipArt/cat03.gif" height="50" border=0 align="absmiddle"> <font size="2" face="verdana" color="#000000">bet[/CODE] |