当前位置:网站首页>生成随机密码/验证码
生成随机密码/验证码
2022-07-06 09:28:00 【梦想身高1米8】
// len,随机长度
const randomAuthorizeCode = (len) => {
// seed,随机范围
var seed = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
let r = ''
// random随机选中
for (let i = 0; i < len; i++) {
let t = Math.round(Math.random() * (seed.length - 1));
r += seed[t];
}
return r;
}
边栏推荐
- [analysis of teacher Gao's software needs] collection of exercises and answers for level 20 cloud class
- 读取和保存zarr文件
- Write web games in C language
- Luogu P1102 A-B number pair (dichotomy, map, double pointer)
- 渗透测试 ( 1 ) --- 必备 工具、导航
- Truck History
- Openwrt source code generation image
- Programmers, what are your skills in code writing?
- Codeforces Round #801 (Div. 2)A~C
- C language learning notes
猜你喜欢

Determine the Photo Position

Penetration test (1) -- necessary tools, navigation

C language is the watershed between low-level and high-level

Configuration du cadre flask loguru log Library

分享一个在树莓派运行dash应用的实例。
![[exercise-4] (UVA 11988) broken keyboard = = (linked list)](/img/59/78ca7170ab1fd364ec44cfbcdc7ab5.png)
[exercise-4] (UVA 11988) broken keyboard = = (linked list)

Suffix expression (greed + thinking)

921. Minimum additions to make parentheses valid

Some problems encountered in installing pytorch in windows11 CONDA

2078. Two houses with different colors and the farthest distance
随机推荐
第 300 场周赛 - 力扣(LeetCode)
Hdu-6025-prime sequence (girls' competition)
Openwrt source code generation image
X-forwarded-for details, how to get the client IP
[exercise-2] (UVA 712) s-trees
B - Code Party (girls' competition)
Codeforces Round #799 (Div. 4)A~H
渗透测试 ( 5 ) --- 扫描之王 nmap、渗透测试工具实战技巧合集
[exercise-6] (PTA) divide and conquer
【练习-3】(Uva 442)Matrix Chain Multiplication(矩阵链乘)
Perform general operations on iptables
【练习-6】(Uva 725)Division(除法)== 暴力
[teacher Gao UML software modeling foundation] collection of exercises and answers for level 20 cloud class
Data storage in memory & loading into memory to make the program run
807. Maintain the urban skyline
QNetworkAccessManager实现ftp功能总结
栈的经典应用—括号匹配问题
[exercise 4-1] cake distribution
1323. Maximum number of 6 and 9
图图的学习笔记-进程