clankid
05-23-2003, 11:35 AM
I am trying desperately to learn JavaScript on the fly. Dumb I know when all I have is a basic-intermediate understanding of HTML!
I've read over two days all the beginner JS tutorials I can get my hands on in an effort to make this script work on my website:
<!-- Begin
var m=new Array(13);
m[1]="Jan";
m[2]="Feb";
m[3]="Mar";
m[4]="Apr";
m[5]="May";
m[6]="Jun";
m[7]="Jul";
m[8]="Aug";
m[9]="Sep";
m[10]="Oct";
m[11]="Nov";
m[12]="Dec";
var t=new Date();
var m=m[t.getMonth() + 1];
var da=t.getDate();
var y=t.getYear();
if (y < 2000)
y = y + 1900;
document.write(m + " " + da + ", " + y);
// End -->
It's a free date script (as you can see) that I found both in JavaScript Source and a couple other places. The instructions told me to place the script in the body only, there was no head script to include as I think there likely should have been.
Can anyone help me out? Hook a newbie up?
Help! Updating our site daily at work is driving me bonkers fast!
Thanks!
:D
I've read over two days all the beginner JS tutorials I can get my hands on in an effort to make this script work on my website:
<!-- Begin
var m=new Array(13);
m[1]="Jan";
m[2]="Feb";
m[3]="Mar";
m[4]="Apr";
m[5]="May";
m[6]="Jun";
m[7]="Jul";
m[8]="Aug";
m[9]="Sep";
m[10]="Oct";
m[11]="Nov";
m[12]="Dec";
var t=new Date();
var m=m[t.getMonth() + 1];
var da=t.getDate();
var y=t.getYear();
if (y < 2000)
y = y + 1900;
document.write(m + " " + da + ", " + y);
// End -->
It's a free date script (as you can see) that I found both in JavaScript Source and a couple other places. The instructions told me to place the script in the body only, there was no head script to include as I think there likely should have been.
Can anyone help me out? Hook a newbie up?
Help! Updating our site daily at work is driving me bonkers fast!
Thanks!
:D