gpt4 book ai didi

jquery - 计时器?

转载 作者:行者123 更新时间:2023-12-03 22:43:01 29 4
gpt4 key购买 nike

我需要在 文档就绪 触发后 5 秒调用我的函数 abc()

这在 jQuery 中可能吗?

$(document).ready(function () {

//Wait 5 seconds then call abc();

});

function abc() {}

最佳答案

$(document).ready(function () {

//Wait 5 seconds then call abc();
setTimeout(abc, 5000);

});

setTimeout()link

关于jquery - 计时器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5011549/

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