<script>
document.write(parseInt(10*Math.random()));  //输出0~10之间的随机整数

document.write(Math.floor(Math.random()*10+1));  //输出1~10之间的随机整数

function RndNum(n){
var rnd="";
for(var i=0;i<n;i++)
rnd+=Math.floor(Math.random()*10);
return rnd;
}

...
共1页 1