html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
<!DOCTYPE html>
<html>
<head>
<title>PassWord Generator</title>
<link href='https://fonts.googleapis.com/css?family=Dekko' rel='stylesheet'>
</head>
<body>
<center><button id="gene1" onClick="pass1()">6 Words password</button></center></br></br></br></br>
<center><button id="gene1" onClick="pass2()">10 Words password</button></center></br></br></br></br>
<center><button id="gene1" onClick="pass3()">12 Words password</button></center></br></br></br></br>
<div id="put1"></div>
<h1>PassWord Generator by Carlos Castro V.2</h1>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
body {
background-color: black;
}
#put1 {
padding: 20px;
width: 94%;
height: 15%;
background-color: #0d0d0d;
color: white;
text-align: center;
font-size: 35px;
font-family: 'Dekko' ;
border: 2px solid #00ff00;
border-radius: 25px;
cursor: not-allowed;
}
#put1:hover {
background-color: #001a00;
color: #e6e6e6;
cursor: not-allowed;
}
#gene1 {
border: 2px solid #00ff00;
border-radius: 25px;
font-size: 20px;
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function pass1() {
var caracter1 = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "K", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "k", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "&", "%", "_", "-", ".", ",", ":", "~"];
var pws1 = ''
for(let i=0; i<6; i++) {
var random1 = Math.floor(Math.random() * caracter1.length);
pws1 += caracter1[random1];
}
document.getElementById('put1').innerHTML = "Your password is... " + pws1;
}
function pass2() {
var caracter2 = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "K", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "k", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "&", "%", "_", "-", ".", ",", ":", "~"];
var pws2 = ''
for(let i=0; i<10; i++) {
var random2 = Math.floor(Math.random() * caracter2.length);
pws2 += caracter2[random2];
}
document.getElementById('put1').innerHTML = "Your password is... " + pws2;
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run