87,904
社区成员
发帖
与我相关
我的任务
分享
<font onmouseover="show()" onmouseout="hide()">靠近我</font><br>
<script>
var o;
function show()
{
o = document.createElement("img");
o.src = 'http://c.csdn.net/bbs/t/5/i/pic_logo.gif';
o.style.position = "absolute";
o.style.left = event.x;
o.style.top = event.y;
document.body.appendChild(o);
}
function hide()
{
document.body.removeChild(o);
}
</script>
<script>
function show(){
document.getElementById("imgshow").style.display="block"
}
function hide(){
document.getElementById("imgshow").style.display="none"
}
</script>
<body>
<div onmouseover="show()" onmouseout="hide()">靠近我</div>
<img id="imgshow" style="display:none" src="http://www.websbook.com/sc/upimg/litimg/080322/16045911506.jpg"> </img>
</body>