// 补零函数 function toDub(num) { return num > 9 ? '' + num : '0' + num; } // 封装随机数 function rnd(m, n) { return parseInt(Math.random() * (n - m) + m); }