产生随机数

var i=Math.round(Math.random()*100);
var j=i%=2;

 

i为产生的1-100的随机数,j为取模运算。

posted on 2010-09-07 16:26  lovening  阅读(181)  评论(0编辑  收藏  举报