Home > Web Front-end > JS Tutorial > body text

A picture magnification effect that follows the mouse, compatible with FF_Image special effects

WBOY
Release: 2016-05-16 19:14:35
Original
1409 people have browsed it











<SCRIPT>         <br>function show(_this) { <br>    document.getElementById("enlarge_images").innerHTML = "<img src='"   _this.src   "' >"; <br>} <br>function hide(_this) { <br>    document.getElementById("enlarge_images").innerHTML = ""; <br>} <br>function move_layer(event){ <br>    event = event || window.event; <br>    enlarge_images.style.left=event.clientX document.body.scrollLeft 10; <br>    enlarge_images.style.top=event.clientY document.body.scrollTop 10; <br>} <br>document.onmousemove =move_layer; <br></SCRIPT>


[Ctrl A 全选 注:如需引入外部Js需刷新才能执行
]<script> function show(_this) { document.getElementById("enlarge_images").innerHTML = "<img src='" + _this.src + "' alt="A picture magnification effect that follows the mouse, compatible with FF_Image special effects" >"; } function hide(_this) { document.getElementById("enlarge_images").innerHTML = ""; } function move_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>
Related labels:
source:php.cn
Previous article:Web page background gradient effect code_page background Next article:Code for javascript to generate/parse dom's CDATA type fields_javascript skills
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Issues
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template