Mark Forums Read
  #1  
Old 06-05-2010, 03:58 AM
JavaScriptBank JavaScriptBank is offline
Senior Member
 
Join Date: Sep 2009
Posts: 130
JavaScriptBank is on a distinguished road
Default LCD Digital Clock

This digital clock JavaScript code attempts to parody that cool 'glowing in the dark night' look of a LCD clock watch by its interface. LCD displays the ... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


How to setup

Step 1: Place CSS below in your HEAD section
CSS
Code:
<style> <!-- .styling{ background-color:black; color:lime; font: bold 15px MS Sans Serif; padding: 3px; } --> </style>
Step 2: Copy & Paste JavaScript code below in your HEAD section
JavaScript
Code:
<script> <!-- /***************************************** * LCD Clock script- by Javascriptkit.com *****************************************/ var alternate=0 var standardbrowser=!document.all&&!document.getElementById if (standardbrowser) document.write('<form name="tick"><input type="text" name="tock" size="6"></form>') function show(){ if (!standardbrowser) var clockobj=document.getElementById? document.getElementById("digitalclock") : document.all.digitalclock var Digital=new Date() var hours=Digital.getHours() var minutes=Digital.getMinutes() var dn="AM" if (hours==12) dn="PM" if (hours>12){ dn="PM" hours=hours-12 } if (hours==0) hours=12 if (hours.toString().length==1) hours="0"+hours if (minutes<=9) minutes="0"+minutes if (standardbrowser){ if (alternate==0) document.tick.tock.value=hours+" : "+minutes+" "+dn else document.tick.tock.value=hours+" "+minutes+" "+dn } else{ if (alternate==0) clockobj.innerHTML=hours+"<font color='lime'>&nbsp;:&nbsp;</font>"+minutes+" "+"<sup style='font-size:1px'>"+dn+"</sup>" else clockobj.innerHTML=hours+"<font color='black'>&nbsp;:&nbsp;</font>"+minutes+" "+"<sup style='font-size:1px'>"+dn+"</sup>" } alternate=(alternate==0)? 1 : 0 setTimeout("show()",1000) } window.onload=show //--> </script>
Step 3: Copy & Paste HTML code below in your BODY section
HTML
Code:
<span id="digitalclock" class="styling"></span>





Reply With Quote
 #Add to Ads's Reputation  
OldSponsored Ads
Ads AdsPromoter is online
Member
 
Join Date: LongTime
Posts: 1100
Ads is on a distinguished road
Default New Sponsored Ads



This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 05:30 PM.


Powered by vBulletin Version 3.6.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 2.4.0