<!-- http://www.knowsky.com -->
<!-- bbs http://bbs.knowsky.com -->
移动键盘的方向键可以看到效果!
<!--要完成此效果需要两个步骤
第一步:把如下代码加入到<head>区域中-->
<script language="JavaScript">
function movepage()
{
var direction =event.keyCode
switch(direction){
case 39:
window.moveBy(15, 0);
window.moveBy(0, 0);
break
case 37:
window.moveBy(-15, 0);
window.moveBy(0, 0);
break
case 38:
window.moveBy(0, 0);
window.moveBy(0, -15);
break
case 40:
window.moveBy(0, 0);
window.moveBy(0, 15);
break
default:
break
}
}
</script>
<!--第二步:把“onLoad="top.window.focus()" onkeydown="movepage()"”加在<body>标记里
例如:-->
<body onLoad="top.window.focus()" onkeydown="movepage()">