Azam.net
03-26-2005, 11:04 AM
How can I add the month to the title of a page please?
Want to do something like
<TITLE>Special Offers this [MONTH]!</TITLE>
Tried inserting Javascript I usually use in my HTML to show the show to the title tag, but didn't work of course!
<SCRIPT LANGUAGE="JavaScript">
<!-- 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 year=time.getYear();
document.write(" " + lmonth + " ");
// End -->
</SCRIPT>
Many thanks :)
Want to do something like
<TITLE>Special Offers this [MONTH]!</TITLE>
Tried inserting Javascript I usually use in my HTML to show the show to the title tag, but didn't work of course!
<SCRIPT LANGUAGE="JavaScript">
<!-- 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 year=time.getYear();
document.write(" " + lmonth + " ");
// End -->
</SCRIPT>
Many thanks :)