Reputation: 141
Is there any way to output/display a user input like Password such as ** or small circles? let say a user inputs "Maraton" how can I represent it as * in the page not in the <input>
? I am not talking about input type!
Upvotes: 1
Views: 1008
Reputation: 8940
<input type="password" name="any" />
Update: Based on your comment
suppose your div where you want to show your password:
<div id="pass"></div>
Next your javascript code
name = "maraton";
pass="";
for(i=0;i<name.length;i++)
{
pass=pass+"*";
}
var element=document.getElementById("pass");
element.innerHTML=pass;
Upvotes: 2