javascript获取指定范围随机数

function randNum(min,max){
    return Math.floor(Math.random() * (max - min + 1) + min);
}

猜你喜欢

转载自blog.csdn.net/qq_38652871/article/details/89017253