i wrote a simple html file that prints 10 random numbers using javascript. javascript object in turn uses java.util.Random class (live connect) to output the result! but i am not getting exact output when using with functions and events like onLoad or onclick!
<html> <body onLoad="hello()"> <script language="javascript"> function hello() { var i=0;for(;i<10;i++)
{ var j=new java.util.Random(i); document.writeln(j); } } </script></body></html>
And i can get output if we dont use function!
<html> <body > <script language="javascript"> var i=0;for(;i<10;i++)
{ var j=new java.util.Random(i); document.writeln(j); } </script></body></html>
can anybody help me with this bug!