PS:可以用parseInt() 替代下面代码的Math.floor() /** * 生成 min - max 的随机数 * @param {*} min 小数 * @param {*} max 大数 * @returns 满足条件的任意数 */ function getRandom (min = 0,max = 10) { return Math.floor(Math.random() * (max - min + 1))
专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]
Copyright (C)ICode9.com, All Rights Reserved.
ICode9版权所有