File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ <!-- JavaScript program to show/hide password
2+
3+ This code is contributed by Shubham baghel (username -> shubhambaghel34) in HacktoberFest 2022 -->
4+
5+
6+ <!DOCTYPE html>
7+ < html lang ="en ">
8+
9+ < head >
10+ < meta charset ="UTF-8 ">
11+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
12+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
13+ < title > HacktoberFest_22</ title >
14+ </ head >
15+
16+ < body >
17+ < div class ="container ">
18+ < h3 >
19+ JavaScript program to show/hide Password
20+ </ h3 >
21+ < p >
22+ This JavaScript code is contributed by Shubham Baghel (username -> shubhambaghel34) in HacktoberFest 2022.
23+ </ p >
24+ </ div >
25+ Enter Password: < input type ="password " value ="cyberblock " id ="passwordid ">
26+ < input type ="checkbox " onclick ="showHidePassword() "/> Show Password</ br >
27+ < br > < br >
28+
29+ < script >
30+ function showHidePassword ( ) {
31+ var getPasword = document . getElementById ( "passwordid" ) ;
32+ if ( getPasword . type === "password" ) {
33+ getPasword . type = "text" ;
34+ } else {
35+ getPasword . type = "password" ;
36+ }
37+ }
38+ </ script >
39+ </ body >
40+
41+ </ html >
You can’t perform that action at this time.
0 commit comments