Code: Alles auswählen
<!-- Script-Anfang -->
<!-- Diesen Code musst Du in den <body> einfügen.-->
<script LANGUAGE="JavaScript">
<!-- Begin
// Set the dates below
var goLiveDate = "20011015";
var expireDate = "20011020";
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>Dieser Text ist gültig vom: " + liveDay + "." + liveMonth + "." + liveYear + "<br>und wird nach dem: " + expireDay + "." + expireMonth + "." + expireYear +" nicht mehr angezeigt.</b></div>")
}
// End -->
</script>
<!-- Script-Ende -->