Hi I would like to replace the input of my prompt dialog box with asterisks. For example I write tom then i want the alert dialog box to display your password is ***.
<script type="text/JavaScript">
//declared variables
var input1 =0;
var dis = input1.length;
input1=prompt("Please enter your Password here","Enter Password Here");
dis.replace(/./gmi, '*')
window.alert("Valid password "+ input1 + "\n You entered the password " +
input1);
</script>
I tried this but it said replace is undefined.