gpt4 book ai didi

javascript - Jquery 23秒延迟更改div

转载 作者:行者123 更新时间:2023-12-02 20:16:50 25 4
gpt4 key购买 nike

我像这样实现了我的 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.swfa.swf我在23 seconds之后做了使用jQuery 。我怎样才能做到这一点?

<script type="text/javascript">
swfobject.embedSWF("printmachine.swf", "cu3er-container", "960", "400", "9", "expressInstall.swf", flashvars, attributes);
</script>

谢谢

最佳答案

它并不是真正特定于 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>

关于javascript - Jquery 23秒延迟更改div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6151826/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com