Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q926 How can I automate a text link so that its links to the current months "What's New" page?

You are here: irt.org | FAQ | JavaScript | Link | Q926 [ previous next ]

This one is easy:

<A HREF="default.htm" onClick="now=new Date();this.href='month' + (now.getMonth() + 1) + '.htm'">What's New</A>

Which will link to one of twelve pages: month1.htm through to month12.htm, depending on the current month.

©2018 Martin Webb