| | |
Display a clock
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2007
Posts: 290
Reputation:
Solved Threads: 7
Hi all,
I do not know where to put these Thread , so I am hoping that you will answer me here .
http://www.w3schools.com/js/tryit.asp?filename=tryjs_timing_clock
I do not understand why these code display clock .
Thank you for your effort of reading .
I do not know where to put these Thread , so I am hoping that you will answer me here .
http://www.w3schools.com/js/tryit.asp?filename=tryjs_timing_clock
I do not understand why these code display clock .
Thank you for your effort of reading .
hi
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
All this is doing is pulling the date from your local computer (little clock in the bottom right corner (on xp). And storing the hours, mins and seconds in variables.
the rest of the script is a bit usless and just makes it look complicated. All it does is add 0's and stuff.
This is quite simple javascript, so if you are just hopping, trying to grasp the language, i would suggest to start at the beggining and go slowly making sure you understand peices before moving on.
Reece
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
All this is doing is pulling the date from your local computer (little clock in the bottom right corner (on xp). And storing the hours, mins and seconds in variables.
the rest of the script is a bit usless and just makes it look complicated. All it does is add 0's and stuff.
This is quite simple javascript, so if you are just hopping, trying to grasp the language, i would suggest to start at the beggining and go slowly making sure you understand peices before moving on.
Reece
![]() |
Similar Threads
- Visual Basic Timer/Clock/Countdown. (Visual Basic 4 / 5 / 6)
- displaying time (Java)
- how to clock video card? (Monitors, Displays and Video Cards)
- !NEW!:::::!!Time Display Program!! (C++)
Other Threads in the HTML and CSS Forum
- Previous Thread: Software info help :)
- Next Thread: Layout Tables to CSS
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 xml xsl






