好记性不如烂笔头。

js实现用键盘翻页

<script language="javascript">
<!--
function keyUp(e) {
if(navigator.appName == "Microsoft Internet Explorer")
{
var keycode = event.keyCode;
var realkey = String.fromCharCode(event.keyCode);
}else
{
var keycode = e.which;
var realkey = String.fromCharCode(e.which);
}
if(keycode==39){
window.location.href=document.getElementById("next").href;
}
if(keycode==37){
window.location.href=document.getElementById("pre").href;;
}
}
document.onkeydown = keyUp;
//-->
</script>