jquery display an alert after each 50 seconds, how to?
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!
精彩评论