ID
|
032
|
<html> <head> <title> JavaScript DESTINATION - P032 </title> </head> <body> <h2>Nahodne cisla loterie: </font> </center> <script language="JavaScript"> <!-- numb = new Array(6); var Different; for (var i = 0; i < 6; i++) { Different = false; while (Different == false) { Different = true; numb[i] = Math.floor(Math.random() * 49) + 1; for (j = 0; j < 6; j++) { if ((numb[i] == numb[j]) && (i != j)) { Different = false; } } } } document.write('<font color=000080 size=+3>' + numb[0] + ' ' + '<font color=993300 size=+3>' + numb[1] + ' ' + '<font color=black size=+3>' + numb[2] + ' ' + '<font color=green size=+3>' + numb[3] + ' ' + '<font color=red size=+3>' + ' ' + numb[4] + '<font color=purple size=+3>' + ' ' + numb[5] + '<//font>') // --> </script> </body> </html> |