t;SCRIPT LANGUAGE="JavaScript">
<!--
function random() {
var now=new Date();
var num=(now.getSeconds()) % 10;
var num=num+1;
alert(num);
}
// -->
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<INPUT TYPE="button" VALUE="Random Number" onClick="random()">
</FORM>
</BODY>
Click here to test this function.
Number Object
The mathematical object is used to perform various advanced mathematical
functions.
Properties
Methods
Properties
Below is one of the properties for the mathematical object.
NaN
NaN
The NaN property is a constant value that allows you to report when a number related function or method attempts to wo |