你不是给 checkbox 赋值了吗?
<input name="infoid[]" type="checkbox" id="infoid" value="<?=$rs[$i][idcustomer]?>">提交后查看 $_POST['infoid'] 数组就可以了,只有被选中的 checkbox 会被提交

解决方案 »

  1.   

    $_GET['cmd']//根据这个判断就行了啊
      

  2.   

    我不是submit 要是submit就直接可以$_POST['infoid']我用的是location.replace
      

  3.   

    $_GET['cmd']是判断了!但是里面的<input name="infoid[]" type="checkbox" id="infoid" value="<?=$rs[$i][idcustomer]?>">怎么传过去!我用的是location.replace
      

  4.   

    那你得组合地址形式了,然后用$_GET
      

  5.   

    location.replace
    没用过,不清楚一般都是 submit
    或者 ajax 
      

  6.   

    get提交有点不可思议
    思路:
    点击按钮 触发js函数mufun 
    此函数遍历你的checkbox 找出那些被选中的值  eg:a,c,d
    然后return这些值 构造出你的迁移url     return xxxx.php?yourval=a|c|d/***********/用$_GET[yourval]取出 然后去除| 就可以了
      

  7.   

    <script>location.replace('../admin/login.aspx')</script>上面一般是location.replace的用法,其实你可以用js把你的控件值取出来。拼成字符串。写法如下。<script>
    var infoid = document.getElementByName("infoid");
    location.replace('../admin/login.aspx?infoid='+ infoid);
    </script>你在你的接受服务端加上 $_GET['infoid'];就可以了,一般大同小异,都可以这么做的。
      

  8.   

    点同意的时候js更改form的action为test.php?job=yes,反之job=no
    其他都不用管.
    test.php里.
    $infoid=$_GET['infoid'];//get:$_GET;post:$_POSTif($_GET['job']=='yes'){}elseif($_GET['job']=='no'){}
      

  9.   


     <input type="checkbox" name="ch1[]" value="基本工资" onclick="aaa('ch1')" />
              </label>
                <label>
                基本工资
                
                <input type="checkbox" name="ch1[]" value="绩效工资" onclick="aaa('ch1')"/>
                绩效工资</label>
                <label>
                <input type="checkbox" name="ch1[]" value="计件工资" onclick="aaa('ch1')"/>
                计件工资            </label>
                <label><input type="checkbox" name="ch1[]" value="奖金" onclick="aaa('ch1')"/>
                奖金</label>
                <label>
                <input type="checkbox" name="ch1[]" value="津贴和补贴" onclick="aaa('ch1')"/>
                津贴和补贴
                
                <input type="checkbox" name="ch1[]" value="加班加点工资"onclick="aaa('ch1')" />
                加班加点工资
                <input type="checkbox" name="ch1[]" value="分红" onclick="aaa('ch1')"/>
                分红
                
                <input type="checkbox" name="ch1[]" value="其他" onclick="aaa('ch1')"/>
              其他<div id="ch1" style="width:100px; color:#FF0000"></div></label>
    后台:$a=$_POST['ch1'];
    $b=implode("|", $a);//一个字符串;