开发者

digital clock using javascript/jquery

开发者 https://www.devze.com 2022-12-26 10:58 出处:网络
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 ea

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

精彩评论

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