1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<html>
<body>
<script type="text/javascript">
<!--
var zahl = new Array(6);
zahl[0] = 15;
zahl[1] = 19;
var i = 2;
function in_array(item,arr) {
for(p=0;p<arr.length;p++) if(item == arr[p]) return true;
return false;
}
function Numsort (a, b) {
return a - b;
}
function gen() {
neu = Math.ceil(Math.random()*49);
if(in_array(neu,zahl) == false) {
i++;
zahl[i] = neu;
}
}
while(i <= 5) gen();
zahl.sort(Numsort);
document.open("text/html")
document.writeln("<div align=\"center\">")
document.writeln("<table border=\"0\" cellspacing=\"4\" cellpadding=\"8\" bgcolor=\"#CCCCCC\">")
document.writeln("<tr align=\"center\" valign=\"center\">")
for(j = 0; j < i; j++) document.writeln("<td width=\"50\">" + String(zahl[j]).fontsize(6).bold().fixed() + "</td>")
document.writeln("</tr>")
document.writeln("</table>")
document.writeln("</div>")
document.close()
//-->
</script>
</body>
</html> |