Hola,
como puedo hacer en javascript esto (cuando presiono un botón, chekear los checkbox):    
Código Javascript
:
Ver original<script>
 
function seleccionar(la_variable){
   
      forms.lavariable[0].checked=true;
      forms.lavariable[1].checked=true;
      forms.lavariable[2].checked=true;
 
}
 
</script>
  
     
Código HTML:
Ver originalSELECCIONAR GRUPO 0:
<input type="button" onclick="seleccionar('tumtum_0');">  
SELECCIONAR GRUPO 1:
<input type="button" onclick="seleccionar('tumtum_1');">  
 
<input type="checkbox" name="tumtum_0"> <input type="checkbox" name="tumtum_0"> <input type="checkbox" name="tumtum_0">  
<input type="checkbox" name="tumtum_1"> <input type="checkbox" name="tumtum_1"> <input type="checkbox" name="tumtum_1"> 
  
   
Me interesa saber si de un "string" puedo hacer referencia al nombre de una variable.   
NOTA: No quiero utilizar "id" quiero utilizar "name".
NOTA1: En PHP hay algo parecido a esto utilizando "$$" delante de una variable