Home > Web Front-end > JS Tutorial > A bug_javascript trick in ie handling the onload event of gif animation

A bug_javascript trick in ie handling the onload event of gif animation

WBOY
Release: 2016-05-16 19:15:03
Original
1058 people have browsed it

If the src of the A bug_javascript trick in ie handling the onload event of gif animation tag is a gif animation, then its onload event will be triggered repeatedly.
firefox does not have such a problem.
A bug_javascript trick in ie handling the onload event of gif animation


Solution: A bug_javascript trick in ie handling the onload event of gif animation


<script> <BR>//by Go_Rush(阿舜) from http://ashun.cnblogs.com/ <BR>function gorush(obj){ <BR> alert("如果img的src为多帧gif动画,这个会重复弹出") <BR>} <BR></script>If src is set to static gif or jpg, bmp and other formats, it will not work This bug appears <script> <BR>//by Go_Rush(阿舜) from http://ashun.cnblogs.com/ <BR>function gorush(obj){ <BR> alert("这样,就只会弹出一次") <BR> obj.onload=null; <BR>} <BR></script>

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template