Datumsgesteuerte Bildeinblendung

Moderator: HTML-Laie

Antworten
Benutzeravatar
Hape
Administrator
Beiträge: 336
Registriert: Fr 22. Mai 2020, 00:33

Datumsgesteuerte Bildeinblendung

Beitrag von Hape »

Code: Alles auswählen

<!-- Script-Anfang -->
<!-- www-java24.net - DIE Javascript - Ressource -->

<!--  Diesen Code musst Du in den -body- einbauen -->
<script LANGUAGE="JavaScript1.1">
<!-- Beginning of JavaScript - 
today=new Date(); //determines the current date
start=new Date("October 30, 2004"); //date you want your image to start displaying
end=new Date("November 30, 2004"); //date you want your image to stop displaying

/*if the current date is between the start and end dates that you set,
then your special image is displayed. Otherwise your default image is
displayed. Be sure to include width and height tags for NN2*/

if ((today.getTime()>=start.getTime()) &&
(today.getTime()<=end.getTime())){
document.write("<a href='http://www.toplist.java24.net' target='_blank'><img src='http://www.toplist.java24.net/top_banner_468_60.gif' border=0></a>");
}
else{
document.write("<a href='http://www.java24.net'><IMG SRC='http://www.java24.net/gif/banner_468_60.gif' WIDTH='468' HEIGHT='60' border=0></a>");
}
// - End of JavaScript - -->
      </script>

<!-- Script-Ende -->
<!-- www-java24.net - DIE Javascript - Ressource -->

Antworten