标签:
<html> <head> <title>【荐】JS控制文本框中的密码显示/隐藏功能_网页代码站(www.6a8a.com)</title> <style> body,input{font:menu} </style> </head> <body> <form method="POST" action="addcheck.asp" name="forms"> <span id=box><input type="password" name="password" size="20" value="www.6a8a.com"></span> <span id=click><a href="javascript:ps()">显示密码</a></span> <script language="JavaScript"> function ps(){ if (this.forms.password.type="password") box.innerHTML="<input type=\"html\" name=\"password\" size=\"20\" value="+this.forms.password.value+">"; click.innerHTML="<a href=\"javascript:txt()\">隐藏密码</a>"} function txt(){ if (this.forms.password.type="text") box.innerHTML="<input type=\"password\" name=\"password\" size=\"20\" value="+this.forms.password.value+">"; click.innerHTML="<a href=\"javascript:ps()\">显示密码</a>"} </script></form> <br /> <p><a href="http://www.6a8a.com">网页代码站</a> - 最专业的网页代码下载网站 - 致力为中国站长提供有质量的网页代码!</p> </body> </html>
标签:
原文地址:http://www.cnblogs.com/webfby/p/4942650.html