Kotakota,
<script>
function ShowHidePassword(id) {
element = document.getElementById(id);
if (element.type == 'password') {
/*element.type = 'text';
element.value = element.value;*/
var inp = document.createElement("input");
inp.id = id;
inp.type = "text";
inp.value = element.value;
//alert(inp.parentNode.tagName);
element.parentNode.replaceChild(inp, element);
}
else {
/*element.type = 'password';
element.value = element.value;*/
var inp = document.createElement("input");
inp.id = id;
inp.type = "password";
inp.value = element.value;
element.parentNode.replaceChild(inp, element);
}
}
</script>
<input type="password" id="pid">
<a href="#" onclick="ShowHidePassword('pid')">click</a>