嗨 如何在javascript中设置15分钟的时间间隔,我将使用(var logouTimeInterval = 3000; //三秒钟来回3秒)它会工作,我可以设置为10秒,但我可以设置1,2,3 ......分钟, 请回复我如何在javascript中设置15分钟的时间间隔。 问候 Aravind
解决方案参考 - Javascript settimeout [ ^ ]。 Quote:
如果你想让它重复运行你可以使用setInterval函数:
setInterval( function (){ alert(' hello world'); }, 15 * 60 * 1000 );此外,您可以查看jquery idleTimer插件,它允许您检测用户不活动的时间段并采取一些操作。
所以,请执行以下操作。
var logouTimeInterval = 15 * 60 * 1000 ;
Hi How set time interval for 15 mins in javascript,i will use (var logouTimeInterval = 3000; // Three Second fro 3 sec) and it will work,i can set upto 10 secs,but i can set 1,2,3... mins, pls reply me how to set 15 mins time interval in javascript. Regards Aravind
解决方案 Refer - Javascript settimeout[^]. Quote:You could use the setInterval function if you want it to run repeatedly:
setInterval(function() { alert('hello world'); }, 15 * 60 * 1000);Also you might take a look at the jquery idleTimer plugin which allows you to detect periods of user inactivity and take some actions.
So, do like below.
var logouTimeInterval = 15 * 60 * 1000;更多推荐
如何在java脚本中设置15分钟的时间间隔?
发布评论