通过jQuery改变对象嵌入源 [英] Changing object embed source via jquery
问题描述
$('#flash embed')。attr('src',msg.d);
< object id =flash>
< embed src =type =application / x-shockwave-flashwidth =800height =600>< / embed>
< / object>
我找到了一些解决方案。我结束了使用第二个。
方法1: 方法3 I need to be able to load up different flash files when users click an image in my gallary. My current solution works perfectly fine in Firefox, but Chrome and IE are not working and it isn't giving any error messages. I use jquery to change the embed source
I found a few solutions. I ended up using the second one. Method 1:
I insert the entire object tab with embed dynamically. That seems to fix flash loading issues in Chrome and IE. Method 2:
I found a jquery flashloader plugin that is simple to use and works well.
http://jquery.lukelutman.com/plugins/flash/ Method 3
Use jquery swfObject
http://jquery.thewikies.com/swfobject/examples 这篇关于通过jQuery改变对象嵌入源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
动态嵌入整个对象选项卡。方法2:
我发现了一个jQuery的Flashloader插件,它是简单的使用和运作良好。
http://jquery.lukelutman.com/plugins/flash/
使用jquery swfObject
http://jquery.thewikies.com/swfobject/examples $('#flash embed').attr('src', msg.d);
<object id="flash">
<embed src="" type="application/x-shockwave-flash" width="800" height="600"></embed>
</object>