-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
64 lines (62 loc) · 2.6 KB
/
script.js
File metadata and controls
64 lines (62 loc) · 2.6 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
function pressed() {
var Symbols = ["!", "@", "#", "$", "%", "^", "&", "*", "_", "-"]
var input = document.getElementById("inp").value;
var teseter = input.split("")
if (input.length >= 8) {
document.getElementById("condition5").style.color = "green";
document.getElementById("condition5").style.fontWeight = "1";
} else {
document.getElementById("condition5").style.color = "red";
document.getElementById("condition5").style.fontWeight = "1000";
}
for (i of input.split("")) {
if (Symbols.indexOf(i) !== -1) {
document.getElementById("condition3").style.color = "green";
document.getElementById("condition3").style.fontWeight = "1";
break;
} else {
document.getElementById("condition3").style.color = "red";
document.getElementById("condition3").style.fontWeight = "1000";
}
}
for (i of input.split("")) {
if (isNaN(i) == false) {
document.getElementById("condition4").style.color = "green";
document.getElementById("condition4").style.fontWeight = "1";
break;
} else {
document.getElementById("condition4").style.color = "red";
document.getElementById("condition4").style.fontWeight = "1000";
}
}
for (i of input.split("")) {
if (isNaN(i) == false){
document.getElementById("condition1").style.color = "red";
document.getElementById("condition1").style.fontWeight = "1000";
break;
}
else if (i === i.toUpperCase()) {
document.getElementById("condition1").style.color = "green";
document.getElementById("condition1").style.fontWeight = "1";
break;
} else {
document.getElementById("condition1").style.color = "red";
document.getElementById("condition1").style.fontWeight = "1000";
}
}
for (i of input.split("")) {
if (isNaN(i) == false){
document.getElementById("condition1").style.color = "red";
document.getElementById("condition1").style.fontWeight = "1000";
break;
}
if (i === i.toLowerCase()) {
document.getElementById("condition2").style.color = "green";
document.getElementById("condition2").style.fontWeight = "1";
break;
} else {
document.getElementById("condition2").style.color = "red";
document.getElementById("condition2").style.fontWeight = "1000";
}
}
}