Javascript source from the clock. Put some stuff first into the head section:
<style>
<!--
.styling{
background-color:black;
color:lime;
font: bold 16px MS Sans Serif;
padding: 3px;
}
-->
</style>
This is the part used in the body:
<span id="digitalclock" class="styling"></span>
<script>
<!--
//LCD Clock script- by javascriptkit.com
javascript comments
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use
var alternate=0
Variable named alternate with the value 0
var standardbrowser=!document.all&&!document.getElementById
???????
if (standardbrowser)
simple if condition
document.write('<form name="tick"><input type="text" name="tock" size="11"></form>')
object with method in dot synthax
function show(){
grouped commands by the opening the curly barckets{
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
}
and closing the curly brackets }
if (hours==0) hours=12
if (hours.toString().length==1)
hours="0"+hours
if (minutes<=9)
minutes="0"+minutes
if (standardbrowser){ if else commands showing the
literal : on the screen or not
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'> : </font>"+minutes+" "+"<sup style='font-size:1px'>"+dn+"</sup>"
else
clockobj.innerHTML=hours+"<font color='black'> : </font>"+minutes+" "+"<sup style='font-size:1px'>"+dn+"</sup>"
}
alternate=(alternate==0)? 1 : 0
setTimeout("show()",1000)
}
window.onload=show
//-->
</script>
o.k. I quit by this...it is far ahead of my mind at the moment...not sure if ever I will be able to understand :))
As I am fulltimeworker I can only work on the lessons during weekend. I had to catch up fast for not gettig behind, so couldn't search long enough for a script which I can understand a bit better.