DevHunters.com l Webmaster Forum - Web Advertising - Web Design - SEO Forums  

Go Back   DevHunters.com l Webmaster Forum - Web Advertising - Web Design - SEO Forums > Webmaster / Coding / Web Design Discussion > JavaScript Programming

JavaScript Programming Discuss javascript coding.

Have A Look At Some Of Our Webmaster Related Sponsors!


Script Directory


Shopping Cart


Market Leverage


Free Templates

3D Guide-Characters
3D Guide-characters

social bookmarking network
Advertise Here

Reply
 
LinkBack Thread Tools Display Modes
Old 11-05-2007, 05:43 AM   #1 (permalink)
Field Master
 
john's Avatar
 

Join Date: Sep 2007
Location: Europe - Greece
Posts: 335
iTrader: 1 / 100%
Hunter Bux: 18.00
john is a jewel in the roughjohn is a jewel in the roughjohn is a jewel in the roughjohn is a jewel in the rough
Default Add a simple Clock in your page

with this script you can add a simple clock in your page
Code:
<HTML>
<TITLE>Clock</TITLE>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function showFilled(Value) {
  return (Value > 9) ? "" + Value : "0" + Value;
}
function StartClock24() {
  TheTime = new Date;
  document.clock.showTime.value = showFilled(TheTime.getHours()) + ":" + showFilled(TheTime.getMinutes()) + ":" + showFilled(TheTime.getSeconds());
  setTimeout("StartClock24()",1000)
}
//-->
</script>
<style type="text/css">
<!--
.input { border-style: none;
         font-family:Verdana,Arial,Helvetica,sans-serif;
	 font-size:8pt
}
-->
</style>
</head>
<BODY bgcolor="#FFFFFF" onLoad="StartClock24()">
<center>
  <br>
  <br>
  <u><font face="Arial, Helvetica, sans-serif" size="4">Simple Java Clock</font></u><br>
  <br>
  <br>
  </font> 
  <form name=clock>
  <input type=text name=showTime size=8 class=input>
  </form>
</center>
</body>
</html>
john is offline   Reply With Quote
Old 11-05-2007, 11:05 PM   #2 (permalink)
Member
 

Join Date: Nov 2007
Posts: 35
iTrader: 0 / 0%
Hunter Bux: 0
ukiya006 is on a distinguished road
Default

a nice and simple clock. i would use it in some of my web pages. ;)
ukiya006 is offline   Reply With Quote
Old 11-19-2007, 04:37 AM   #3 (permalink)
New Hunter
 

Join Date: Nov 2007
Posts: 8
iTrader: 0 / 0%
Hunter Bux: 10.00
geduzas16 is on a distinguished road
Default

Realy nice i gona use it to :o:o:o
geduzas16 is offline   Reply With Quote
Old 12-27-2007, 06:14 AM   #4 (permalink)
New Hunter
 

Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 85
iTrader: 0 / 0%
Hunter Bux: 5.00
Smiggy will become famous soon enoughSmiggy will become famous soon enough
Send a message via MSN to Smiggy
Default My Clock

I used a different technique:

Code:
function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('time').innerHTML=h+":"+m+":"+s;
t=setTimeout('startTime()',100);
}
Smiggy is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:43 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
vBCredits v1.4 Copyright ©2007, PixelFX Studios