html5 随机数函数

function selec(low,high){
var ch=high-low+1;
return Math.floor(Math.random()*ch+low);
}
for (var i = 0; i < 10; i++) {
    document.write(selec(1111,8888)+"<br>");
}

posted @ 2018-06-19 09:24  侯伟东  阅读(2370)  评论(0编辑  收藏  举报