javasript实现查看隐藏的密码框明文代码
2016-06-24来源:易贤网

<html><head><title>密码的隐藏与显示</title>

</head>

<body bgcolor=#fef4d9><br><br>

<center>密码的隐藏与显示</center><br>

<center>

<table bordercolor=#cc0000 border=5 borderlight=green>

<tbody>

<tr>

<td align=middle><div align=center>效果显示</div></td>

</tr>

<tr>

<td align=middle>

<form name=forms action= method=post><span id=box>

<input type=password value=523654 name=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></td></tr></tbody></table></center>

</body>

</html></td>

</tr>

</table>

2025公考·省考培训课程试听预约报名

  • 报班类型
  • 姓名
  • 手机号
  • 验证码
推荐信息