0

Can I know how to create a password for a web page using JavaScript

21st May 2020, 9:28 PM
Deepak Yadav
Deepak Yadav - avatar
3 Réponses
+ 2
HTML: <input name="userPass" id="userPass" type="password" /> Js: //getting value const userPass= document.getElementById("userPass").value; //Then you can validate the password using js another way, using prompt: //no recommended const userPass = window.prompt("enter pass"); /* Notice that you can not mask the input with a JavaScript window.prompt() Consider using a jQuery UI Modal Form Dialog. http://jqueryui.com/dialog/#modal-form */
21st May 2020, 10:21 PM
CoffeeByte
CoffeeByte - avatar
0
Wait, do you want to create a random password or a user login?
21st May 2020, 9:44 PM
4lx
4lx - avatar
0
IxAmxIdiot ; For user login I have to learn my sql. I want a prompt password .
21st May 2020, 9:50 PM
Deepak Yadav
Deepak Yadav - avatar