<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<img src="http://www.google.cn/intl/zh-CN/images/logo_cn.gif" style="position:absolute; left:100px; top:100px;" id="pic" />
<script type="text/javascript">
function move()
{
var evt = window.event || arguments[0];
var key=evt.keyCode;
var pic = document.getElementById("pic");
var x=parseInt(pic.style.left);
var y=parseInt(pic.style.top);
var step=50;
if(key==37)
pic.style.left=x-step+"px";
if(key==38)
pic.style.top=y-step+"px";
if(key==39)
pic.style.left=x+step+"px";
if(key==40)
pic.style.top=y+step+"px";
}window.onload = function()
{
document.onkeydown = move;
}
</script>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货