AUTO EXPIRE CALENDAR SCRIPT

Bookmark and Share
Step by Step how to install java script effect for Auto expire , you can follow instruction as below to implement in your website or blog :


<!-- ONE STEP TO INSTALL AUTO EXPIRE:

  1.  Copy the coding into the BODY of your HTML document  -->

<!-- STEP ONE: Paste this code into the BODY of your HTML document  -->

<BODY>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
// Set the dates below
var goLiveDate = "20030613";
var expireDate = "20101015";

var expireYear = expireDate.substring(0,4)
var expireMonth = expireDate.slice(4,-2)
var expireDay = expireDate.slice(6)
var liveYear = goLiveDate.substring(0,4)
var liveMonth = goLiveDate.slice(4,-2)
var liveDay = goLiveDate.slice(6)
var nowDate = new Date();
var day = nowDate.getUTCDate();
var month = nowDate.getUTCMonth();
var month1 = month + 1;
  if (month1 < 10)
  {
  month1 = "0" + month1;
  }
  if (day < 10)
  {
  day = "0" + day;
  }
var year = nowDate.getYear();
var GMTdate = year + "" + month1 + "" + day
if ((GMTdate < expireDate) && (GMTdate >= goLiveDate))
{

// Insert the text you want displayed below
document.write("<div align='center'><b>This content appeared on " + liveMonth + "/" + liveDay + "/" + liveYear + "<br>and will disappear on " + expireMonth + "/" + expireDay + "/" + expireYear +".</b></div>")

}
//  End -->
</script>


<!-- Script Size:  1.45 KB -->

{ 0 comments... Views All / Send Comment! }

Post a Comment