PDA

View Full Version : random numbers??



adash5000
Mar 29th, 2003, 01:10 AM
how can i make a group of 9 random numbers from 1 to 9 so that each one is displayed once.
:rolleyes:

Nightfire
Mar 29th, 2003, 01:35 AM
http://tech.irt.org/articles/js033/#3 maybe?

whammy
Mar 29th, 2003, 01:51 AM
Math.ceil(Math.random() * 9);

I think... but I'm too preoccupied. Anyway, play around with that... play around with this too...



<script type="text/javascript">
<!--
function rand16(){
var returnVal = "";
var returnval = Math.round(Math.random() * 16);
return returnVal;
}
// -->
</script>