手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >显示、隐藏密码
显示、隐藏密码
摘要:显示、隐藏密码-www.51windows.Netbody,input{font:menu}显示密码functionps(){if(this...

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<meta name="GENERATOR" content="Microsoft FrontPage 4.0">

<meta name="ProgId" content="FrontPage.Editor.Document">

<title>显示、隐藏密码-www.51windows.Net</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="51windows.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>

<script>

function help(){

title="显示、隐藏密码"

time="23:17 2002-8-17"

tips="显示、隐藏input中的密码,动态改为input的type值。在提示注册时就不用来两个输入框了:)"

info="nwww.51windows.comn海娃:jimao8@163.com"

alert(title+"n("+time+")nn"+tips+"nn"+info)}

document.write("<button onclick=help();>Help</button >");

document.write("<button onclick=window.location='view-source:'+window.location.href;>源文件</button >")

</script>

</body>

</html>

【显示、隐藏密码】相关文章:

不错显示时间特效

二级连动菜单

javasript实现密码的隐藏与显示

基于JavaScript实现表单密码的隐藏和显示出来

JavaScript中的replace()方法使用详解

Ctrl + Enter提交前检测的代码

JQuery给网页更换皮肤的方法

jquery 实现密码框的显示与隐藏示例代码

Javascript特效:随机显示图片的源代码

表格轮换显示 强

精品推荐
分类导航