Helloi
I want my codes to produce six numbers between 1-and 49 randomly..and print all the numbers in rows..(on a blank page)
Printable View
Helloi
I want my codes to produce six numbers between 1-and 49 randomly..and print all the numbers in rows..(on a blank page)
<html>
<head>
<title>Numbers</title>
<script>
var numbers = new Array(6);
var i;
var numberString = '';
function getNumbers(){
for(i = 0; i<6; i++){
numbers[i] = Math.round((Math.random()* 48) + 1);
numberString += numbers[i] + ' ';
}
document.writeln(numberString);
}
</script>
</head>
<body ONLOAD = "getNumbers();">
</body>
</html>