location.href = "nextPage.html?t="+ t

解决方案 »

  1.   

    错了,是这个~~~<html>   <head>   <title>   dddd   </title>               
    <script language="javascript">       
    function cc()       
    {       
    var oC=document.form1.sItem;      
    var t=0;       
    if(oC)       
    {       
    for(var   i=0;i <oC.length;i++)       
    {       
      if(oC(i).checked) t++       
    }       
    }       
    if(t==oC.length)
        { 
    document.write("全选");   

    else   if(t==0) 
    {document.write("无")}   
    else{ 
    document.write("选择部分") 
    }   
        }       
    </script>        
            </head>               
    <body>                   
                    
            <form               name="form1"               ID="Form1">                       
                    <p>   请选择项目:                   <br>   
                            <input               type="checkbox"               value="CRC"               name="sItem">   
                            <br>               
                            <input               type="checkbox"               value="Northsnow"               name="sItem"               ID="Checkbox1">   
                            <br>               
                            <input               type="checkbox"               value="CSDN"               name="sItem"               ID="Checkbox2">   
                            <br>               
                            <input               type="checkbox"               value="a"               name="sItem"               ID="Checkbox3">   
                            <br>               

                            <input               type="checkbox"               value="b"               name="sItem"               ID="Checkbox4">   
                            <br>               
                            <input               type="checkbox"               value="c"               name="sItem"               ID="Checkbox5">   
                            <br>               
                            <input               type="checkbox"               value="d"               name="sItem"               ID="Checkbox6">   
                            <br>               
                            <input               type="checkbox"               value="e"               name="sItem"               ID="Checkbox7">   
                            <br>               
                            <input               type="checkbox"               value="f"               name="sItem"               ID="Checkbox8">   
                            <br>               
                            <input               type="checkbox"               value="g"               name="sItem"               ID="Checkbox9">   
                            <br>               
                            <input               type="button"               name="ss"               value="OK"               onclick="cc();">               
                                    </p>   
    </form>  
    <%Response.write aa%>                     
    </body>               
            </html>   
      

  2.   

    <html> <head> <title> dddd </title> 
    <script language="javascript">   
    function cc()   
    {   
      var oC=document.form1.sItem;  
      var t=0;   
      if(oC)   
      {   
        for(var i=0;i <oC.length;i++)   
        {   
        if(oC(i).checked) t++   
        }   
      }   
      var all=document.getElementById("all");
      if(t==oC.length)
        { 
        all.value="全选";
        } 
        else if(t==0) 
        {
          all.value="无";
          } 
        else{ 
        all.value="选择部分"; 
        } 
      }   
    </script>    
        </head> 
    <body>   
      
        <form name="form1" ID="Form1" method="post">   
      <p> 请选择项目:   <br> 
        <input type="checkbox" value="CRC" name="sItem"> 
        <br> 
        <input type="checkbox" value="Northsnow" name="sItem" ID="Checkbox1"> 
        <br> 
        <input type="checkbox" value="CSDN" name="sItem" ID="Checkbox2"> 
        <br> 
        <input type="checkbox" value="a" name="sItem" ID="Checkbox3"> 
        <br> 
        
        <input type="checkbox" value="b" name="sItem" ID="Checkbox4"> 
        <br> 
        <input type="checkbox" value="c" name="sItem" ID="Checkbox5"> 
        <br> 
        <input type="checkbox" value="d" name="sItem" ID="Checkbox6"> 
        <br> 
        <input type="checkbox" value="e" name="sItem" ID="Checkbox7"> 
        <br> 
        <input type="checkbox" value="f" name="sItem" ID="Checkbox8"> 
        <br> 
        <input type="checkbox" value="g" name="sItem" ID="Checkbox9"> 
        <br> 
        <input type="button" name="ss" value="OK" onclick="cc();"> 
        <input type="hidden" name="all" id="all" /><!--加个隐藏的-->
      </p> 
    </form>  
    <%
    dim all:all=request.form("all")
    if all<>"" then response.write all
    %>
    </body> 
        </html> 
      

  3.   

    楼上,请问:
    我在ASP中怎么调试不通?并且<%
    dim all:all=request.form("all")
    if all<>"" then response.write all
    %>为什么会这样写?ASP中不是这样写啊
      

  4.   

    不同过?什么意思?出错?dim all'定义一个变量
    all=request.form("all")'获取客户端表单中的name='all'的控件的值,因为表单为post提交,所以需要request.form,reuest也可以
    if all<>"" then response.write all '如果all变量的值不为空则输出这个变量的值
      

  5.   

       极端鄙视火狐,人家IE是绑定windows操作系统的,你凭什么和人家抢市场份额?抢来抢去就10%的料,每次让我们程序员调试几个浏览器,你就不能最后按照w3c标准输出IE格式?就只会抢IE收藏夹,还美其名曰书签,简直不要脸!你看人家IE有没有内置抢劫书签功能?
      

  6.   

    dim all:all=request.form("all")'这句??
    '你是没见过这样写而已,":" 是重起一行的意思,这样可以把多行代码写到一行来
      

  7.   

    不会输出ALL的值,
    并且ASP的写法也不是这样啊dim all'定义一个变量
    all=request.form("all")'获取客户端表单中的name='all'的控件的值,因为表单为post提交,所以需要request.form,reuest也可以
    if all<>"" then response.write all '如果all变量的值不为空则输出这个变量的值
    -----------------------
    dim all
    all=request.form("all")
    if all<>"" then response.write all end if 
      

  8.   

    我建议你重新看看vbscript的if语句
      

  9.   

    晕,抛开这个先不讨论,我直接COPY你的代码,执行都不可以啊
      

  10.   

    哦~~~知道了,你的是普通按钮,不是提交按钮,汗.......<input type="button" name="ss" value="OK" onclick="cc();"> ==><input type="submit" name="ss" value="OK" onclick="cc();">