function pageChange(fileName,t){ 
var cpage=document.getElementById("pageSelect").selectedIndex; //你这个是什么的值?是select列表的
var path = fileName+"inpage="+(cpage+1)+"&t="+t; //fileName这个又是什么值?是http://BBS.csdn.net/index.aspx这样的吗?如果是得在"http://topic.csdn.net/index.aspx"+"?inpage="+(cpage+1)+"&t="+t;
alert(path); 
window.location.href=path; 

解决方案 »

  1.   

    强调下,整个path取下来数据为window.location.href='dealVolume.do?method=list&page=1&inpages=3&t=15 '
    但是在后台的form里面去不到page等参数的值
      

  2.   

    [Quote=引用 1 楼 chinmo 的回复:]
    JScript codefunction pageChange(fileName,t){ 
    var cpage=document.getElementById("pageSelect").selectedIndex; //你这个是什么的值?是select列表的
    这个是select列表
    并且cpage也能取到具体的值
      

  3.   

    你后台是如何读取值的,有做过验证吗?
    dealVolume.do?method=list&page=1&inpages=3&t=15直接在浏览器上查看这个能看到结果吗?
      

  4.   

    function pageChange(fileName,t){ 
    var cpage=document.getElementById("pageSelect").selectedIndex; 
    var path = fileName+"inpage="+(cpage+1)+"&t="+t; 
    alert(path); 
    with (cpage) {
         method = "post";
         action = path;
         submit();
         }

    这样试试!!!
      

  5.   

    后台找不到??
    怎么传的?http://abc.com?a='as'&b='ss'  这样的?我这里可以接收到request.getParameter("a");
    request.getParameter("b");
      

  6.   

    我还在调试通过request.getParameter("a");的方式
      

  7.   

    通过request.getParameter("a");的方式 
    取到的值是null啊
      

  8.   

    alert(path); 
    你这里弹出的结果是什么?
      

  9.   

    弹出的结果是 dealVolume.do?method=list&page=1&inpages=3&t=15 6楼和你的方法都试过了,还是不能取到值啊
      

  10.   


    function pageChange(fileName,t){
    var cpage=document.getElementById("pageSelect").selectedIndex;
    var path = fileName+"inpage="+(cpage+1)+"&t="+t;

    //window.location.href=path;
    with (cpage) { 
         method = "post"; 
         action = path; 
         submit(); 
         } 
    }
    就这段代码,后台也取不到值
      

  11.   

    dealVolume.do?method=list&page=1&inpages=3&t=15 在dealVolume.do页面
    request.getParameter("page")得不到结果?
      

  12.   

    是的,但能跳转到dealVolume.do这个方法在做单步调试的时候能跳转到这个方法里面getParameterValues
      

  13.   

    dealVolume.do?method=list&page=1&inpages=3&t=15 直接在浏览器上这样访问用request.getParameter("page")也得不到结果?如果是,与JS就没关系了