Click to See Complete Forum and Search --> : I need a JavaScript


em-jay
07-26-2003, 10:16 AM
I am a novice to HTML, as I have been building and updating my website using Yahoo! PageBuilder. I would like to be able to display a JavaScript date on my homepage, http://www.geocities.com/mjlarochelle, using the following font script:

<font face="Verdana, Arial, Sans Serif" size="2" color="#000000">

I have tried to add this script to the existing date script that I have tried, which can be found attached in Text format. So far I have had no success.

Could somebody please help me with adding this font script to the existing date script??? I want the date to appear my way.

Thanx

SlankenOgen
07-26-2003, 11:09 AM
Paste this where you want the date to appear-



<SCRIPT LANGUAGE="JavaScript1.2">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
document.write("<font face=\"Verdana, Arial, Sans Serif\" size=\"2\" color=\"#000000\"><center>" + lmonth + " ");
document.write(date + ", " + year + "<\/center><\/font>");
// End -->
</SCRIPT>

azaza
07-26-2003, 02:27 PM
I think you can make the date to appear your way by controlling the date codes throuth the <center>, <right> and <left> tags.

I don't know that what you ment, but let me know if you need more help.