<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<script>
function GoNext(page,chkid,hsid)
        {
           var reocrders = document.getElementById("tblist").getElementsByTagName("tr"); 
           for(j=0;j<reocrders.length;j++)
           {
           currentRow = reocrders.item(j) ;
           cur_cells = currentRow.getElementsByTagName("td"); 
           for(i=0;i<cur_cells.length;i++)
           {
           var cz=currentRow.id;
                 alert(chkid);//到这个地方还是正确的值,但是下面就不对了。
         var tru=JYYJ.AddData(cz.split('|')[1],cz.split('|')[0],chkid,hsid);  //此处是在a.aspx.cs里写的函数,运用Ajax        
        }
        }
        document.location.href=page+"?ChkID="+chkid+"&HSID="+hsid;  
        }
</script>
</head><body>
<input type="button" value="下一步" class="btn" id="Button3"  onclick="GoPre('JDGL.aspx','200808281002','87029010')"/>
</body>
</html>

解决方案 »

  1.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
    <script>
    function GoNext(page,chkid,hsid)
            {
               var reocrders = document.getElementById("tblist").getElementsByTagName("tr"); 
               for(j=0;j<reocrders.length;j++)
               {
               currentRow = reocrders.item(j) ;
               cur_cells = currentRow.getElementsByTagName("td"); 
               for(i=0;i<cur_cells.length;i++)
               {
               var cz=currentRow.id;
                     alert(chkid);//到这个地方还是正确的值,但是下面就不对了。
             var tru=JYYJ.AddData(cz.split('|')[1],cz.split('|')[0],chkid,hsid);  //此处是在a.aspx.cs里写的函数,运用Ajax        
            }
            }
            document.location.href=page+"?ChkID="+chkid+"&HSID="+hsid;  
            }
    </script>
    </head><body>
    <input type="button" value="下一步" class="btn" id="Button3"  onclick="GoPre('JDGL.aspx','200808281002','87029010')"/>
    </body>
    </html>
      

  2.   

    var tru=JYYJ.AddData(cz.split('|')[1],cz.split('|')[0],chkid,hsid);可能是这个函数给改变了,  只是猜测而以。