You are here: irt.org | FAQ | JavaScript | Misc | Q1605 [ previous next ]
Try the following:
<script language="JavaScript"><!-- function getPage() { var now = new Date(); var year = now.getFullYear(); var month = now.getMonth() + 1; var day = now.getDay(); return 'http://www.somewhere.com/' + year + '/' + month + '/' + day + '/index.htm'; } //--></script> <a href="default.htm" onClick="location.replace(getPage());return false">replace</a>