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不能为空……必须要有值…… jquery中,这个this指的是谁? 菜鸟求救!关于网页特效 命名空间的问题 select 触发事件问题 急急!!高手帮忙看看一个在<body></body>中获取js变量值的问题 怎样取得一个元素的绝对位置? 100分 100分 100分求页面间数据传送解决方案 程序实现的效果类型于客户的联系地址的添加. 求一网页功能:对页面的表单,光标移动每行时,可以高亮显示当前行 请问可以直接在表格中进行输入和修改?我看到JCL好象是可以的,不知道为什么? JQuery选择器 请问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">