Javascript countdown clock with auto restart
What i need is a javascript countdown clock that wi开发者_Python百科ll start everyday at 7:40am and end at 2:15pm. But when it ends at 2:15pm i need it to auto restart at 7:40 am.
<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();
});
精彩评论