在表单提交后保留一个GIF动画 [英] Keep an Animated GIF Going After Form Submits
本文介绍了在表单提交后保留一个GIF动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下代码适用于ie6,ie7,chrome,但不适用于ff3
The following works for me in ie6,ie7,chrome but not ff3
document.getElementById("form-name").submit();
var image = document.getElementById("loader-img");
setTimeout(function() { image.src = image.src; },50);
我可以做些什么以获得更大的一致性?
What can I do for more consistency?
推荐答案
您应该异步执行该帖子,否则UI可能会挂起。查看 jQuery表单插件以获取更多信息。
You should do the post asynchronously, if not the UI may hang. Take a look at the jQuery Form Plugin for more information.
这篇关于在表单提交后保留一个GIF动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文