NOTE: Free essay sample provided on this page should be used for references or sample purposes only. The sample essay is available to anyone, so any direct quoting without mentioning the source will be considered plagiarism by schools, colleges and universities that use plagiarism detection software. To get a completely brand-new, plagiarism-free essay, please use our essay writing service.
One click instant price quote
This script shows a real-time digital clock using your own images. Just be sure and replace your image names or name your images correctly in the code below Copy the following code into your HEAD tags. < script language = "Javascript"> function Go () { nu = new Date (); hr = nu. get Hours (); min = nu. get Minutes (); sec = nu.
get Seconds (); ext = ." gif"; if (hr< = " 9 ") {hr = " 0 " + hr; } else {hr = "" + hr; } if (min< = " 9 ") {min = " 0 " + min; } else {min = "" + min; } if (sec< = " 9 ") {sec = " 0 " + sec; } else {sec = "" + sec; } hrc = hr. substring (0, 1); hrd = hr. substring (1, 2); document. images. hra. src = "" + hrc + ext; document.
images. hrb. src = "" + hrd + ext; minc = min. substring (0, 1); mind = min.
substring (1, 2); document. images. mina. src = "" + minc + ext; document. images. many.
src = "" + mind + ext; secc = sec. substring (0, 1); send = sec. substring (1, 2); document. images.
seca. src = "" + secc + ext; document. images. see. src = "" + send + ext; setTimeout ("Go () ", 20); } < /script> Copy the following code into your BODY tag. < body onLoad = "Go (); "> Copy the following code into the BODY of your html page. < img src = "" name = hra> < img src = "" name = hrb> < img src = "y. gif"> < img src = "" name = mina> < img src = "" name = many> < img src = "y.
gif"> < img src = "" name = seca> < img src = "" name = see> And that's it. You should see your image based clock working in real-time. If you have any problems go back and make sure you named all your files correctly. Now for the "Date" script.
Just copy the following into the BODY of your html page. < script language = "Javascript"> < ! -- / Today's date script Visit java-scripts. net or web for this script / var day Name = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday") var mon Name = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") var now = new Date document. write ("Today is " + day Name[now. get Day () ] + ", " + mon Name[now. get Month () ] + "+now. getDate () +.") gt; < /script>
Free research essays on topics related to: real time, script, sec, src, img
Research essay sample on Visual Clock Display Java Script Source Code