0
0
Fork 0

fix: fix Bug 531 and use ES6 grammar

Bug502-YuGaoXiang
吴宇涵 2023-05-06 17:24:51 +08:00
parent 688ed72473
commit f64d06fbbf
1 changed files with 3 additions and 3 deletions

View File

@ -68,9 +68,9 @@
<script> <script>
// 密码生成器 // 密码生成器
function generatePassword(length) { function generatePassword(length) {
var charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+~`|}{[]\:;?><,./-="; const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^*()_+~`|}{[]\:;?,./-=";
var password = ""; let password = "";
for (var i = 0; i < length; i++) { for (let i = 0; i < length; i++) {
password += charset.charAt(Math.floor(Math.random() * charset.length)); password += charset.charAt(Math.floor(Math.random() * charset.length));
} }
return password; return password;