Home
Developer Blog
Ajax effects
CSS examples
Freelance jobs
Hot IT Jobs
Hot scripts
Code samples
Web hosting directory
Lotus Notes FAQ
See the new scripts recently added to Dynamic Drive.
Click here
.
Original, practical
CSS codes and examples
such as CSS menus for your site.
Search code samples
Keyword
All Categories
ASP
CSS
Dhtml
Html
Javascript
PHP
Code Samples
ASP
CSS
Dhtml
Html
Javascript
PHP
LOGIN HERE
Username
Password
Signup Now
Forgot Password
Verify Signup
Javascript >> General
how can i create a clock in JavaScript
Visitor Ratings (2) :
Description
The following is a simple function that finds the time (hours:minutes:seconds) and prints it in the document.
Code
Select All
<SCRIPT LANGUAGE="JAVASCRIPT"> <!-- function det_time() { var d = new Date(); var c_hour = d.getHours(); var c_min = d.getMinutes(); var c_sec = d.getSeconds(); var t = c_hour + ":" + c_min + ":" + c_sec; return t; } //--> </SCRIPT>
Rate this Resource
0
1
2
3
4
5
6
7
8
9
10