gpt4 book ai didi

javascript - $().countdown 不是函数

转载 作者:行者123 更新时间:2023-11-30 07:26:46 24 4
gpt4 key购买 nike

我的代码中有这一行

$('#timeLeftDiv').countdown({ until: expires, timezone: 0, serverSync: serverTime, onTick: serverTime, tickInterval: 60 });

它给我这个错误

TypeError: $("#timeLeftDiv").countdown is not a function

timeLeftDiv 的内容以 Ajaxily 方式刷新。这有什么关系吗?

我已经在我的代码中包含了这一行

<script src="/<path>/jquery.countdown.min.js">

我错过了什么?

最佳答案

可能是缺失的 </script>标签。

假设您之前已经包含了 jQuery,请尝试:

<script type="text/javascript" src="/<path>/jquery.countdown.min.js"></script>

关于javascript - $().countdown 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11646370/

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