顯示、隱藏密碼
更新時間:2006年07月01日 00:00:00 作者:
<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">
<!--51windows.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中的密碼,動態(tài)改為input的type值。在提示注冊時就不用來兩個輸入框了:)"
info="\nwww.51windows.com\n海娃:jimao8@163.com"
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>
<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">
<!--51windows.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中的密碼,動態(tài)改為input的type值。在提示注冊時就不用來兩個輸入框了:)"
info="\nwww.51windows.com\n海娃:jimao8@163.com"
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>
相關(guān)文章
默認(rèn)讓頁面的第一個控件選中的javascript代碼
當(dāng)頁面上面顯示了一個表單后,通常焦點(diǎn) 并不是放在第一個控件上面,只需要一點(diǎn)通常的腳本就可以實(shí)現(xiàn)這個效果 。2009-12-12javaScript 簡單驗(yàn)證代碼(用戶名,密碼,郵箱)
下面的代碼包括了用戶名,密碼,郵箱的基本驗(yàn)證代碼,需要的朋友可以參考下。2009-09-09在textarea中顯示html頁面的javascript代碼
在textarea中顯示html頁面的javascript代碼...2007-04-04