Home  >  Article  >  Web Front-end  >  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
WBOYOriginal
2016-05-16 19:15:031047browse

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>

Statement:
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