<input type="checkbox" class="checkbox" checked name="select1" value="11" onchange="function(1)">

解决方案 »

  1.   

    你的写法问题多多
    1 函数名不能叫“select”
    2 document.all[select1].value不能这样写function myselect(tag)
      {
         if ("1" == tag)
         {
                   for (i=0;i<document.all("select1").length;i++){
            document.all[select].value=document.all[select].value + "," + document.all[select1](i).value;
                   }
         }           
         else
               {
                        按照上面的修改
                        //document.all[select].value=document.all[select2].value;
                }
    }
      

  2.   

    上面的有个地方写错了
    这个对
    function myselect(tag)
      {
         if ("1" == tag)
         {
                   for (i=0;i<document.all("select1").length;i++){
            document.all("select").value=document.all("select").value + "," + document.all("select1")(i).value;
                   }
         }           
         else
               {
                        按照上面的修改
                        //document.all[select].value=document.all[select2].value;
                }
    }
      

  3.   

    我觉得关键是
    document.all[select].value=document.all[select1].value;
    这个赋值语句对吗?这样赋值能把一组select1的值都赋给select吗?
    好像不行的呀。
    在java或者C++这里面直接传指针或者引用即可,在js里应该怎么做呢?