0
Can I know how to create a password for a web page using JavaScript
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
*/
0
Wait, do you want to create a random password or a user login?
0
IxAmxIdiot ; For user login I have to learn my sql. I want a prompt password .