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/
精彩评论