|
-
Apr 27th, 2002, 12:28 PM
#1
printing random numbers..
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)
-
Apr 27th, 2002, 01:46 PM
#2
Fanatic Member
<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>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|