Lesson 32: The Script and Its Effect



The Script

<SCRIPT LANGUAGE="JavaScript">
function rand()
{
var now=new Date()
var num=(now.getSeconds())%9
var numEnd=num+1
alert(numEnd)
}
</SCRIPT>

<FORM>
<INPUT TYPE="button" VALUE="Random Number from 1 to 10" onClick="rand()">
</FORM>

 

The Script's Effect

 

Back to the Index Page