你换成直接的html试试,应该没问题的。

解决方案 »

  1.   

    测试了下,也是后两个页面OK,第一页不成功。代码贴下:
    function foo()
    {
     if(window.event.keyCode == "37" )
     {
     alert(document.all.prepage.value)
      if(document.all.prepage.value!="" ){
       window.location.replace(document.all.prepage.value)
      }  
      return;
     }
     if (window.event.keyCode == "39" )
     {
     alert(document.all.nextpage.value)
      if(document.all.prepage.value!=""){
       window.location.replace(document.all.nextpage.value)
      }
      return;
     } 
      if(window.event.keyCode == "38")
     {
     alert(document.all.prepara.value)
      if(document.all.prepage.value!="" ){
       window.location.replace(document.all.prepara.value)
      }  
      return;
     }
     if (window.event.keyCode == "40")
     {
     alert(document.all.nextpara.value)
      if(document.all.prepage.value!=""){
       window.location.replace(document.all.nextpara.value)
      }
      return;
     }
    }
    以上是Javascript,按下上下左右4个按键页面相应跳转,下面是表单的代码
    <input type="hidden" name="prepara" value="">
    <input type="hidden" name="prepage" value="">
    <input type="hidden" name="nextpage" value="/naruto1/2009-4-16/HuoYingDi-2-Xie.htm">
    <input type="hidden" name="nextpara" value="/naruto2/2009-4-16/HuoYing-2-Di-1-Xie.htm">
      

  2.   

    to:skycc999
    请问页面需要设置什么呢?郁闷的是,为啥后面两页OK,第一页不行。
    第一页的表单
    <input type="hidden" name="prepara" value=""> 
    <input type="hidden" name="prepage" value=""> 
    <input type="hidden" name="nextpage" value="/naruto1/2009-4-16/HuoYingDi-2-Xie.htm"> 
    <input type="hidden" name="nextpara" value="/naruto2/2009-4-16/HuoYing-2-Di-1-Xie.htm">
    第二页的表单
    <input type="hidden" name="prepara" value="">
    <input type="hidden" name="prepage" value="/naruto1/2009-4-16/HuoYingDi-1-Xie.htm">
    <input type="hidden" name="nextpage" value="/naruto1/2009-4-16/HuoYingDi-3-Xie.htm">
    <input type="hidden" name="nextpara" value="/naruto2/2009-4-16/HuoYing-2-Di-1-Xie.htm">
      

  3.   

    解决了……value不能为空……必须要有值……