Skip to content

Commit 452c662

Browse files
committed
update
1 parent 0ef8b90 commit 452c662

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Password Strength Meter/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="container">
1313
<header>Password Strength Meter<br></header>
1414
<form action="#">
15-
<div class="field"><input id="trigger" type="password" placeholder="Type your password"><span class="showBtn">SHOW</span></div>
15+
<div class="field"><input onkeyup="trigger()" type="password" placeholder="Type your password"><span class="showBtn">SHOW</span></div>
1616
<!--field-->
1717
<div class="indicator">
1818
<span class="weak"></span>

Password Strength Meter/script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let regExpStrong = /.[!,@,#,$,%,^,&,*,(,)]/;
1212

1313

1414

15-
document.getElementById("trigger").addEventListener("keyup", function() {
15+
function trigger() {
1616
if (input.value != "") {
1717
indicator.style.display = "flex";
1818

@@ -66,5 +66,5 @@ document.getElementById("trigger").addEventListener("keyup", function() {
6666
text.style.display = "none";
6767
showBtn.style.display = "none";
6868
}
69-
});
69+
}
7070

0 commit comments

Comments
 (0)