+ 1

One of my code is a form. I need a functional 'Show password' button. What should i do?

12th Jan 2017, 8:34 AM
Jay Jathan
Jay Jathan - avatar
3 Answers
+ 6
<input type=password id=pass> <button onclick="show()"> function show() { document.getElementById("pass").setAttribute("src", "text") }
12th Jan 2017, 9:52 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 5
Found this: http://codepen.io/nopr/pen/HpEhb Seems to use JS to just toggle attribute 'type' of <input> tag between 'text' and 'password'... suppose that you don't refer to this element with query it by its 'type' attribute, obviously ^^
12th Jan 2017, 9:11 AM
visph
visph - avatar
+ 2
you have two choice. 1.use a textbox instead of password and add show password button . 2.download provided forms from github.com
12th Jan 2017, 8:46 AM
mojtaba noghabaee
mojtaba noghabaee - avatar