You are here: irt.org | FAQ | JavaScript | Date | Q468 [ previous next ]
Try this:
<SCRIPT LANGUAGE = 'JavaScript'><!-- var date = new Date(); var hours = date.getHours(); if ( (hours < 6) || (hours > 18) ) document.write('<A HREF="night.html">click this link<\/A>'); else document.write(<A HREF="day.html">click this link<\/A>'); //--></SCRIPT>