<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#bodyid{
border:#F00 1px solid;
height:600px;
width:800px;
}
</style>
<script type="text/javascript">
window.onload = function()
{
document.body.onmousemove = function()
{
var imgNode = document.getElementById("imgid");
imgNode.style.left = event.x;
imgNode.style.top = event.y;
}
}
</script>
</head>
<body>
<div id="imgid" style="position:absolute; border:#999 1px solid" >
<a href="http:\\www.baidu.com" target="_blank">
<img src="../IMG_7245.JPG" height="80px" width="100px"/>
</a>
</div>
<div id="bodyid">
body区域
</div>
</body>
|
|