Set NEW Indicator to Expire

[Total: 0    Average: 0/5]

This shows how to have an image appear next to some other item on your page, where that image shows “NEW” (it shows a ball here)

Body Code:

<script type=text/javascript>
var image = ""; // your "NEW" image

function expnew(when) {
  when = new Date(when);
  date = new Date();
  if (when.getTime() > date.getTime()) {
    document.write("<img height=10 src="+image+">")
document.write("<BR>Is not new after 2/3/2000");expnew("2/3/2000");
document.write("<BR>Is not new after 2/3/2010");expnew("2/3/2010");

Times Viewed: 4

Leave a Reply

Your email address will not be published. Required fields are marked *