The simplest way is to use CSS -webkit-text-security
You can use the values none
, square
, circle
or disc
.
Example below using circle
:
function Foo() {
frm = document.getElementById("frm");
document.getElementById("bar").innerHTML = frm["foo"].value;
//console.log(frm["foo"].value);
}
input.foo { -webkit-text-security: circle; }
<form id="frm" action="" method="POST">
<input type="text" name="foo" class="foo" size="15">
<input type="button" value="clique para ver o texto real" onclick="Foo();">
</form>
<br><div id="bar"></div>
The Javascript part is for didactic testing only, to display the actual text.
What have you tried so far? Enter the code to see and tell you what you need to adjust or correct
– MarioAleo