Javascript 页面跳转的奇怪问题 你换成直接的html试试,应该没问题的。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 测试了下,也是后两个页面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"> 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"> 解决了……value不能为空……必须要有值…… Url.Content的问题。。在线等。。。。 初学ExtJS的一点疑惑。 注册用户名输入验证代码失灵,恳请高手指点 类似图片展示的功能怎么做?点击左右按钮 [求助]在JavaScript中,如何将字符串按照特定的规律切割成数组? 如何做一个无工具栏的网页? 一个firefox与IE兼容的问题,点击图片显示div 急需日历控件!! alert中的字如何换行? 关于表单提交时的校验(关于文本框内的数字比较和计算) 请问javascript中能让反斜杠不转义吗? js如何判断页面里的控件个数
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">
请问页面需要设置什么呢?郁闷的是,为啥后面两页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">