一个跟随鼠标的图片放大效果,与FF兼容_Javascript教程-查字典教程网
一个跟随鼠标的图片放大效果,与FF兼容
一个跟随鼠标的图片放大效果,与FF兼容
发布时间:2016-12-30 来源:查字典编辑
摘要:functionshow(_this){document.getElementById("enlarge_images").innerHTM...

<divalign=center><imgsrc="http://files.jb51.net/upload/2007426163751315.jpg"width="100"height="100"border="0"onmouseover="show(this)"onmouseout="hide(this)">

</div>

<divalign=center>

<imgsrc="http://files.jb51.net/upload/200742616381460.jpg"width="100"height="100"border="0"onmouseover="show(this)"onmouseout="hide(this)">

</div>

<divalign=center>

<imgsrc="http://files.jb51.net/upload/200742616383849.jpg"width="100"height="100"border="0"onmouseover="show(this)"onmouseout="hide(this)">

</div>

<divid="enlarge_images"></div>

<SCRIPT>

functionshow(_this){

document.getElementById("enlarge_images").innerHTML="<imgsrc='"+_this.src+"'>";

}

functionhide(_this){

document.getElementById("enlarge_images").innerHTML="";

}

functionmove_layer(event){

event=event||window.event;

enlarge_images.style.left=event.clientX+document.body.scrollLeft+10;

enlarge_images.style.top=event.clientY+document.body.scrollTop+10;

}

document.onmousemove=move_layer;

</SCRIPT>

[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新Javascript教程学习
    热门Javascript教程学习
    编程开发子分类