<!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=utf-8" />
<title>点我啊</title>
<style type="text/css">
img{
position:absolute;
top:10px;
left:10px;
}
</style>
<script type="text/javascript">
function mouseover(img){
var x = parseInt(Math.random() * screen.width);
var y = parseInt(Math.random() * screen.height);
img.style.position="absolute"
img.style.marginLeft = x + "px";
img.style.marginTop = y + "px";
}
</script>
</head>
<body>
<i-- 360浏览器不用 images文件夹,直接选择同html文件夹里的图片。src="cat.jpg" -->
<img src="images/cat.jpg" width="37" height="49" onmousemove="mouseover(this)" />
</body>
</html>