开发者

javascript timer based on world clock?

hey guys, is it possible to fire a function (every second开发者_如何学Python or every 500ms) based on a global world clock or something? I need a simultaneous time on each computer that opens this script!

any idea how to solve this?

regards


You would need to get the world time with some server implementation.

Then you could either decrement it with some setTimeout function with a time-- on the time,
or you could decrement it with some ajax call back to the server which would get the exact time again (also with a setTimeout or setInterval timer)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜