直接给你链接,你参考着做
><html>
<head>
<script language=javascript>
function imgMove()
{
//if the left button was not pressed,return
if(windoweventbutton!= 1)
{
return 0;
}
//get the new position
with(windoweventsrcElementstyle)
{
pixelLeft = windoweventx-236/2-documentallimgDivoffsetLeft;
pixelTop = windoweventy-118/2-documentallimgDivoffsetTop;
}
windoweventreturnValue=false;
}
</script>
</head>
<body>
<div Style="position:relative" ID="imgDiv">
<img src="20080105039jpg" id="img2" Style="CONTAINER:positioned;position:absolute;
top:60px;left:60px;236px;height:118px;" onMouseMove=imgMove()>
</div>
</body>
</html>
你把<img src="20080105039jpg" id="img2" 换成你的就OK了
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)