开发者

digital clock using javascript/jquery

Anybody has a suggestion on how to build a textbox that is exactly like the one showing the windows ti开发者_如何转开发me using javascript and/or jquery?


I think the main idea is to trigger an event each second or millisecond. Which you can do using setTimeout(1000, 'updateClockUI()'); in JavaScript.

in updateClockUI() you refresh your clock UI by updating the currently displayed time. To get the current date/time and other useful functions regarding date/time in JavaScript see http://www.tizag.com/javascriptT/javascriptdate.php

Find some examples here: http://www.webdeveloperjuice.com/2010/02/07/7-wonderful-analog-and-digital-clocks-using-css-and-javascript/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜