I'm trying to build a link on my site that will link to a different page based on what month it is. This is for people to access a monthly calendar. The idea is that the user can click on the "Calendar" link and have it automatically direct them to that months calendar page. Each month will be on a different page. I have almost no experience with Javascript so the following code is my compilation of various sources on the internet. Any help getting this to work would be much apprectiated.
This is located in the "head" section of my page
Code:
<script type="text/javascript">
var d=new Date()
var month=new Array(12)
month[0]="january.htm"
month[1]="february.htm"
month[2]="march.htm"
month[3]="april.htm"
month[4]="may.htm"
month[5]="june.htm"
month[6]="july.htm"
month[7]="august.htm"
month[8]="september.htm"
month[9]="october.htm"
month[10]="november.htm"
month[11]="december.htm"
</script>
and here is where I'm trying to put the link
Code:
<ul id="nav">
<li id="t-home"><a href="home.htm">Home</a></li>
<li id="t-about"><a href="about.htm">FIT Ultimate</a></li>
<li id="t-news"><a href="news.htm">News</a></li>
<li id="t-photos"><a href="photos.htm">Photos</a></li>
<li id="t-roster"><a href="roster.htm">Roster</a></li>
<script type="text/javascript">document.write("<li id="t-calendar"><a href="calendar/"+month+"">Calendar</a></li>")</script>
</ul>
Thanks!