简体   繁体   English

无法选择Flash对象jQuery swfobject

[英]Cannot select flash object jQuery swfobject

I'm using swfobject to embed flash object but after it's rendered, 我正在使用swfobject嵌入Flash对象,但是在渲染之后,

Below code doesn't seem to select the flash object at all it just picks up the div element that was there before it is being rendered: 下面的代码似乎根本没有选择flash对象,它只是拾取了呈现前的div元素:

flashMovie = document.getElementById("slideshare-player");

Is there a reason why this is happening? 有这种情况发生的原因吗?

You want the 'object' inside your div. 您想在div中使用“对象”

//get the ID of your swf //获取瑞士法郎的ID

swfName = document.getElementById("slideshare-player").getElementsByTagName('object')[0].id;

//get the object //获取对象

flashMovie = document.getElementById(swfName);

//tell it to do something //告诉它做点什么

flashMovie.doSomeStuff();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM