每一个你不满意的现在,都有一个你不努力的曾经. 网站首页 > js
js 显示隐藏密码小demo 参考
        发布时间:2018-12-11 11:36:30
        修改时间:2019-01-03 15:45:08
        
        阅读:5324
        评论:0
        
0
    
<html>  <head>   <meta http-equiv="content-type" content="text/html; charset=UTF-8" />   <title>显示、隐藏密码</title>   <style>     body,input{font:menu}   </style>    </head>    <body>     <form name="forms">      <span id="box"><input name="password" size="20" value="" type="password" /></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>  </body> </html>
回复列表
关键字词:nbsp,span,style,lt,gt,font-size
上一篇:css常用属性
下一篇:thinkPHP制作面包屑方法
