Jump to content

Full date


littleMe

Recommended Posts

I have a gap between the date and the clock in this script. how can i get rid of it? Its suppose to be on only one line. Do I have to do this in a CSS document? if so how? And the script only works in IE but not in Mozilla Firefox. What do i have to do to get it to work both places?

<html><body><script type="text/javascript">document.write("Local time: ")var d=new Date()var weekday=new Array("Sunday","Monday","Tuesday","Wednsday","Thursday","Friday","Saturday")var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec")document.write(weekday[d.getDay()] + " ")document.write(d.getDate() + ". ")document.write(monthname[d.getMonth()] + " ")document.write(d.getFullYear())</script><script Language="JavaScript"><!-- hide from old browsersfunction jsClock24hr(){var time = new Date()var hour = time.getHours()var minute = time.getMinutes()var second = time.getSeconds()var temp = "" + ((hour < 10) ? "0" : "") + hourtemp += ((minute < 10) ? ":0" : ":") + minutetemp += ((second < 10) ? ":0" : ":") + seconddocument.getElementById('digits').innerText=tempid = setTimeout("jsClock24hr()",1000)}//--></SCRIPT></head><BODY ONLOAD="jsClock24hr()"><FORM NAME="clockForm24hr"><FONT face="Times New Roman,Normal " size=3><span name = f id = digits>Loadings</span></FONT></FORM></body></html>

Link to comment
Share on other sites

<html><BODY ONLOAD="jsClock24hr()"><FORM NAME="clockForm24hr"><FONT face="Times New Roman,Normal " size=3><script type="text/javascript">document.write("Local time: ")var d=new Date()var weekday=new Array("Sunday","Monday","Tuesday","Wednsday","Thursday","Friday","Saturday")var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec")document.write(weekday[d.getDay()] + " ")document.write(d.getDate() + ". ")document.write(monthname[d.getMonth()] + " ")document.write(d.getFullYear())</script><script Language="JavaScript"><!-- hide from old browsersfunction jsClock24hr(){var time = new Date()var hour = time.getHours()var minute = time.getMinutes()var second = time.getSeconds()var temp = "" + ((hour < 10) ? "0" : "") + hourtemp += ((minute < 10) ? ":0" : ":") + minutetemp += ((second < 10) ? ":0" : ":") + seconddocument.getElementById('digits').innerText=tempid = setTimeout("jsClock24hr()",1000)}//--></SCRIPT></head><span name = f id = digits>Loadings</span></FONT></FORM></body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...