Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 PHP 的新手。我想在我的网页上添加一个倒数计时器。有人可以解释一下怎么做吗?有什么功能可以做到吗?我正在考虑使用 AJAX,但是有没有更简单的方法?
您可以使用 setInterval
function init() { updateCountdown(); window.setInterval(updateTime,30000); } updateCountdown() { //you code }