显示、隐藏密码_表单按钮特效

模板酷站
  •       3/5
  •       1
  •       2
  •       3
  •       4
  •       5
查看演示效果

      织梦DedeCMS视频教程买空间 租服务器 选网硕互联! 无忧站长工具,百度权重一键全查!

      显示、隐藏密码,您可以先修改部分代码再运行.

      <html> <head> <meta http-equiv="Content-Type" mrc="text/html; charset=gb2312"> <title>新建网页 2</title> </head> <body> <html> <head> <title>显示、隐藏密码-模板无忧www.mb5u.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.mb5u.com"></span> <span id=click><a href="javascript:ps()">显示密码</a></span> <script language="JavaScript"> <!--模板无忧www.mb5u.com 23:17 2002-8-17--> 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> <script> function help(){ title="显示、隐藏密码" time="23:17 2002-8-17" tips="显示、隐藏input中的密码,动态改为input的type值。在提示注册时就不用来两个输入框了:)" info="\w" alert(title+"\n("+time+")\n\n"+tips+"\n\n"+info)} document.write("<button style='font:menu;position: absolute; top: 20; right: 10;' onclick=help();>Help</button >"); document.write("<button style='font:menu;position: absolute; top: 20; right: 50;' onclick=window.location='view-source:'+window.location.href;>源文件</button >") </script> </body> </html> </body> </html>