How To Show/Hide an Input Field Password Using the Eye Icon - HTML, CSS & JavaScript

  Рет қаралды 31,125

Web Dev Tutorials

Web Dev Tutorials

Күн бұрын

Пікірлер: 35
@aurelieneveu9595
@aurelieneveu9595 Жыл бұрын
i've been turning aroud this problem for a while now ! your explainations helped a lot, a big thank you :)
@JcodeprgmmngSEtech
@JcodeprgmmngSEtech 2 жыл бұрын
It helps me a lot, I'm still practicing web dev
@rosen.espinoza9477
@rosen.espinoza9477 2 жыл бұрын
Another great video 👏
@Iro0
@Iro0 Жыл бұрын
If someone having a trouble with eye not slashig, then put this: this.classList.toggle("fa-eye"); this.classList.toggle("fa-eye-slash", !this.classList.contains("fa-eye")); Insted of this: this.classList.toggle("fa-eye-slash");
@mdarif2835
@mdarif2835 Жыл бұрын
Thanks for this it work for me but additional add for this class in css .fa-eye-slash{ position:absolute; top: 29%; right: 4%; cursor: pointer; }
@rgferg2657
@rgferg2657 Жыл бұрын
thank youu
@Gaurav_khadka
@Gaurav_khadka 8 ай бұрын
Helped ❤❤❤❤
@uchihasasuke13
@uchihasasuke13 8 ай бұрын
That's why he's the MVP... that's why he's the goatt the GOATTT
@Topisco_1
@Topisco_1 Жыл бұрын
Hi, from Nigeria Thanks alot❤
@Mathotto
@Mathotto 6 ай бұрын
it's a good way of login password,thanks a lot
@skanderchouiter5384
@skanderchouiter5384 2 жыл бұрын
thank you man ! amazing
@alphamx13
@alphamx13 2 жыл бұрын
Great, thanks !!
@nandopookey9195
@nandopookey9195 Жыл бұрын
Thank you so much sir
@woutflorian
@woutflorian Жыл бұрын
Would you please tell me how to switch the icons so that the input start with the "fa-eye-slash" icon and password hidden and when toggled the "fa-eye" icon and the password showing? For some reason simple switching them around is not doing the trick... 🤔
@laziz_khamidov
@laziz_khamidov 10 ай бұрын
thank you bro
@c4rp3v1num
@c4rp3v1num Жыл бұрын
I am trying to adapt this into my own project (my own login screen that I have designed) - but having difficulty getting it to work. It is probably the way I have my code set up for the fields and icons which is slightly different than yours. I use an a.href for the icon rather than CSS code with pointer property. Clicking on the fa-eye icon makes a "missing image" icon appear next to the fa-eye icon, instead of showing the fa-eye-slash icon in place of the fa-eye icon. And the password does not change to text. Any help would be greatly appreciated. Thank you in advance.
@narendrasubramanya5354
@narendrasubramanya5354 6 ай бұрын
Great video dude ... Is it possible to change the password character from dots to say something like x or to any character of our choice. If you can bring up a tutorial video for that it would be very helpful and informative too. Kudos for this video
@hamasood701
@hamasood701 2 жыл бұрын
Amazing
@codefoxx
@codefoxx 2 жыл бұрын
Thanks
@AquariusGoldTM913
@AquariusGoldTM913 Жыл бұрын
Fantastic and precise bro. I tried the script on my form but I got a unique problem my form has multiple password fields and even though i gave them the same id only the first field was responsive. all the rest didn't seems to hide and show the password. The icons were fine though.
@codefoxx
@codefoxx Жыл бұрын
You shouldnt use an id name more than once, perhaps you can do id1 and id2
@AquariusGoldTM913
@AquariusGoldTM913 Жыл бұрын
@@codefoxx I tried that as well but how would i have the script pick up on the other ids. I have password and verify password fields in my form.
@codefoxx
@codefoxx Жыл бұрын
@@AquariusGoldTM913 just create a variable for each of the id's and a function that handles each of them separately
@Hakdog-y2n
@Hakdog-y2n Жыл бұрын
Can i get the source code? Mine is not working it says "Uncaught TypeError: Cannot read properties of null(reading 'addEventListener')
@crespi4163
@crespi4163 11 ай бұрын
try to put the code inside this: document.addEventListener('DOMContentLoaded', function () { //code... });
@rahulmittal1414
@rahulmittal1414 Жыл бұрын
can we use same in excel
@Movies-i7c
@Movies-i7c 2 ай бұрын
how do i know all those code in js
@dhirajchavan1196
@dhirajchavan1196 11 ай бұрын
Help me out with my problem
@dhirajchavan1196
@dhirajchavan1196 11 ай бұрын
Mine is not coming inside the box
@Nitesh__Nayak
@Nitesh__Nayak 10 ай бұрын
It does not work with latest library of font-awesome.
@laziz_khamidov
@laziz_khamidov 10 ай бұрын
but it worked when I did methods = dialog
@jamesokonkwo5815
@jamesokonkwo5815 Жыл бұрын
This part this.classList.toggle("fa-eye-slash"); is not yet working for me, does not toggle. Please what are the things I should ensure that are put in place?
@ahmedradi99
@ahmedradi99 Жыл бұрын
same with me Edit: i found a solution on a YT channel, reply to me to tell u how, it's easy without needing javascript.js file only Html.
@nazrinrustamova6239
@nazrinrustamova6239 Жыл бұрын
@@ahmedradi99 how pls tell me
@ahmedradi99
@ahmedradi99 Жыл бұрын
@@nazrinrustamova6239 hi, i don't remember what is this reply for? what's the topic
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Javascript Arabic Tutorials - Show / Hide Password On Input Field
6:34
Elzero Web School
Рет қаралды 24 М.
How is this Website so fast!?
13:39
Wes Bos
Рет қаралды 1,3 МЛН
Password Show and Hide using HTML CSS & JavaScript #animation
14:02
How to create a SHOW/HIDE Password TextField in React JS
11:54
Koding 101
Рет қаралды 11 М.
Learn CSS Subgrid in 14 minutes
14:19
Slaying The Dragon
Рет қаралды 96 М.
Show/Hide Password Toggle With Javascript | With Source Code
6:55
Coding Artist
Рет қаралды 87 М.