alina: kalender

Beitrag lesen

Hi, hatte schonmal nen thread eröffnet deshalb, aber in dem kann man nicht mehr posten. irgendjemand hatte mir folgendes script gegeben:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Adventskalender</title>
<style type="text/css">
<!--
a:link { font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; color: #990099; text-decoration: none}
a:visited { font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; color: #660099; text-decoration: none }
-->
</style>
<script language="JavaScript" type="text/javascript">
<!--
var warten=new Array()
warten[1]="tag1.htm"
warten[2]="tag2.htm"
warten[3]="tag3.htm"
warten[4]="tag4.htm"
warten[5]="tag5.htm"
warten[6]="tag6.htm"
warten[7]="tag7.htm"
warten[8]="tag8.htm"
warten[9]="tag9.htm"
warten[10]="tag10..htm"
warten[24]="tag24.htm"

var mydate=new Date()
var daym=mydate.getDate()

function moreinfo(test){
if (daym>=test)
window.location=warten[test]
else
alert("Na, du willst doch nicht etwa schummeln?")
}

// -->
</script>
</head>
<body bgcolor="#FFFFFF">
<p align="center">Advent</p>
<table width="180" border="2" align="center" bordercolor="#6699CC" bordercolorlight="#6699CC" bordercolordark="#6699BB">
<tr>
<td width="30" align="center"><a href="javascript:moreinfo(1)">1</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(9)">9</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(17)">17</a></td>
</tr>
<tr>
<td width="30" align="center"><a href="javascript:moreinfo(2)">2</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(10)">10</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(18)">18</a></td>
</tr>
<tr>
<td width="30" align="center"><a href="javascript:moreinfo(3)">3</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(11)">11</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(19)">19</a></td>
</tr>
<tr>
<td width="30" align="center"><a href="javascript:moreinfo(4)">4</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(12)">12</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(20)">20</a></td>
</tr>
<tr>
<td width="30" align="center"><a href="javascript:moreinfo(5)">5</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(13)">13</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(21)">21</a></td>
</tr>
<tr>
<td width="30" align="center"><a href="javascript:moreinfo(6)">6</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(14)">14</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(22)">22</a></td>
</tr>
<tr>
<td width="30" align="center"><a href="javascript:moreinfo(7)">7</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(15)">15</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(23)">23</a></td>
</tr>
<tr>
<td width="30" align="center"><a href="javascript:moreinfo(8)">8</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(16)">16</a></td>
<td width="30" align="center"><a href="javascript:moreinfo(24)">24</a></td>
</tr>
</table>
</body>
</html>

Aber wie erkennt das script nun das datum? ich kann nämlich alle html seiten öffnen, ohne das der Alert fehler kommt :(