开发者

jquery display an alert after each 50 seconds, how to?

开发者 https://www.devze.com 2023-01-04 19:15 出处:网络
anybod开发者_StackOverflow社区y knows an easy way to display an alert after each 50 seconds in jquery (infinite loop)Use setInterval(), like this:

anybod开发者_StackOverflow社区y knows an easy way to display an alert after each 50 seconds in jquery (infinite loop)


Use setInterval(), like this:

setInterval(function() {
 alert('hi!');
}, 50000);

Note this is just JavaScript, no jQuery library needed.

I assume you have a purpose, not actually alerting? :) Please let that be the case!

0

精彩评论

暂无评论...
验证码 换一张
取 消