本帖最后由 vgy12304 于 2010-01-08 09:47:12 编辑

解决方案 »

  1.   

    哈,接点分。N年没混论坛了现在缺分哈~
    //提取出所有input标签内容//Tips: document.getEle....  你可以修改为你指定容器,例如 document.getElementById('getInputArea')
    //getInputArea ->  <div id="getInputArea">...这里有你想要提取的input</input>
    var inputs = document.getElementByTagName("input");
    var getValue = "";
    for(int i=0;i<inputs.length;i++)
    {
      if(inputs[i].type=="checkbox" && inputs[i].checked)
      {
        getValue = inputs[i].value+",";
      }
    }
    document.getElementById('actionid').value = getValue.replace(",$","");
      

  2.   

    document.getElementById('actionid').value这个不行,获取不到,提示undefinded 
      

  3.   

    你就没定义ID当然没了。定义ID
      

  4.   

    var actionid;    ???
      

  5.   

    不对啊,老兄我换思路了,把下面的部分也用<form name=upfrom>..</form>套起来,复制上面表单<form name='search_form'>的所有数据,下面表单<form name=upfrom>,再做一次提交
      

  6.   


    <head>
    <title>test</title>
    <script type="text/javascript">
    function clickSet() {
    var form = document.forms[0];
    var actiontype = form.actiontype.value;
    alert(actiontype);     
    return false;  
    } </script>
    <form>
    </head>
    <body><input type=checkbox name="nid[]" value=4> 
    <input type=checkbox name="nid[]" value=5> 
    <input type=checkbox name="nid[]" value=6> <input type=checkbox id=chkall onclick='checkall()'>全选 </td> 
    <input type="radio" name="actiontype" value="multdel">删除 
    <input type='button' class='btn2' name=submit value=提交 onclick='clickSet();'>
    </form>
    </body>
    </html>