here is an example
but there may be some simpler methods
hope this can inspire u
<html>
<script>
var password = ""
function mask()
{
password=document.form1.pw
tmp=""
for (i=0; i < password.length; i++)
tmp=tmp+"*"
document.form1.pwd.value = tmp
}
function unmask()
{
document.form1.pwd.value = password
}
</script>
<body>
<form name=form1>
<input type=text name=pwd onchange="mask()" onfocus="unmask()">
</form>
</body>
</html>
Main Topics
Browse All Topics





by: sajuksPosted on 2003-12-03 at 23:09:10ID: 9872741
I dont think thats possible, a better way might be to encrypt the data as you enter in the textfield.
or else
<input type="text" name="user_name" value = "enter user name">
<input type="password" name="password" value = "enter passwd">