varre=/
if(window.document.body.innerHTML.search(re)>=0){
varPREVIOUS_PAGE=RegExp.$1;
}
如果搜下到"上一页",则定义varPREVIOUS_PAGE=RegExp.$1;
varre=/
if(window.document.body.innerHTML.search(re)>=0){
varNEXT_PAGE=RegExp.$1;
}
如果搜下到"下一页",则定义varNEXT_PAGE=RegExp.$1;
if(typeofPREVIOUS_PAGE=="string"||typeofNEXT_PAGE=="string"){
document.onkeydown=function(){
switch(event.srcElement.tagName){
case"INPUT":
case"TEXTAREA":
case"SELECT":
break;
default:
if(event.keyCode==37/*ArrowLeft*/&&typeofPREVIOUS_PAGE=="string"){
window.location.href=PREVIOUS_PAGE;
}
elseif(event.keyCode==39/*ArrowRight*/&&typeofNEXT_PAGE=="string"){
window.location.href=NEXT_PAGE;
}
}
}
}