我像这样实现了我的Cub3r
<script type="text/javascript">
var flashvars = {};
flashvars.xml = "config.xml";
flashvars.font = "font.swf";
var attributes = {};
attributes.wmode = "transparent";
attributes.id = "slider";
swfobject.embedSWF("cu3er.swf", "cu3er-container", "960", "400", "9", "expressInstall.swf", flashvars, attributes);
</script>
我希望使用cu3er.swf
将a.swf
更改为23 seconds
jQuery
之后的<script type="text/javascript">
swfobject.embedSWF("printmachine.swf", "cu3er-container", "960", "400", "9", "expressInstall.swf", flashvars, attributes);
</script>
。我怎么能这样做?
{{1}}
由于
答案 0 :(得分:1)
试试这个javascript代码
var flashvars = {};
flashvars.xml = "config.xml";
flashvars.font = "font.swf";
var attributes = {};
attributes.wmode = "transparent";
attributes.id = "slider";
swfobject.embedSWF("cu3er.swf", "cu3er-container", "960", "400", "9", "expressInstall.swf", flashvars, attributes);
setTimeout(function ()
{
swfobject.embedSWF("a.swf", "cu3er-container", "960", "400", "9", "expressInstall.swf", flashvars, attributes);
}, 23000);
答案 1 :(得分:1)
这不是jQuery特有的,你需要的是使用setTimeout
<script type="text/javascript">
// your code ...
swfobject.embedSWF("cu3er.swf", "cu3er-container", /*...*/);
setTimeout(function() {
jQuery('#cu3er-container').empty(); // in case swfobject doesn't clean the div before inserting, might not be needed
swfobject.embedSWF("printmachine.swf", "cu3er-container", "960", "400", "9", "expressInstall.swf", flashvars, attributes);
}, 23000); // the number is in millisecond, so 23 * 1000 for 23 seconds
</script>
答案 2 :(得分:0)
在jquery中尝试 .delay(),这样您就可以在规定的时间后启动替换 http://api.jquery.com/delay/
答案 3 :(得分:0)
在jQuery 1.4+之后,有延迟函数尝试使用