标签:var length and ons OLE def bcd floor random
// 随机生成字符串
RandomNumb(n) {
let str = ‘abcdefghijklmnopqrstuvwxyz9876543210‘;
let tmp = ‘‘,
i = 0,
l = str.length;
for (i = 0; i < n; i++) {
tmp += str.charAt(Math.floor(Math.random() * l));
}
return tmp;
}
var id = vm.RandomNumb(20)
console.log(id)
标签:var length and ons OLE def bcd floor random
原文地址:https://www.cnblogs.com/lihong-123/p/12565092.html