Math.round a random number : random : Math JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Math » random »

 

Math.round a random number

















<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
rndNum = Math.random();
rndNum = rndNum * 100;
alert(Math.round(rndNum));
//  -->
</script>
</head>
<body>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Math
» random