前端JS 编写一个指定范围内的随机数返回方法 云博小周宇2024年5月5日2023年8月14日1 Min Read function GetRandomNum(Min, Max) { var Range = Max - Min; var Rand = Math.random(); return Min + Math.round(Rand * Range); }