我需要的是一个 JavaScript 倒计时时钟,它每天早上 7:40 开始,下午 2:15 结束。但是当它在下午 2:15 结束时,我需要它在上午 7:40 自动重启。
问问题
1204 次
1 回答
0
<script type="text/javascript" src="jquery.js"></script>
// 6 hours and 45 minutes
iMilliseconds = 6 * 60 * 60 * 1000 + 45 * 60 * 1000;
function Restart()
{
Start();
setTimeout(iMilliseconds, Restart);
}
function Start()
{
// Do things
}
$(document).ready(function()
{
Restart();
});
于 2011-04-15T04:03:35.803 回答