There
are several web pages that can look better and make more sense
with updated features/elements displayed. For example: Would you
like to display a "new" image alongside new content that
will automatically disappear (the image) after a specified date
has been reached?
The
logic to doing so is simple. If the current date is less than the
specified future date, write out the "new" image:
<script>
var
newimage='<img src="http://www.apluskb.com/scripts/data//Web_design/Do_it_Yourself/Java/whats_new_files/new.GIF">'
var today=new Date()
function
whatsnew(yr,mon,day){
var expire=new Date(yr,mon,day)
if (today.getTime()<=expire.getTime())
document.write(newimage)
</script>
<!--"New" image
will disappear after Dec 30th, 2002-->
<script>whatsnew(2002,11,30)</script> This
is new content!
Example:
This is new content!