国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

javascript實現仿銀行密碼輸入框效果的代碼

2019-11-21 01:50:58
字體:
來源:轉載
供稿:網友

效果:


銀行 密碼輸入框 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">  <head>  <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />  <title> 密碼輸入框 </title>  <meta name="generator" content="Microsoft FrontPage 6.0"/>  <meta name="author" content="lin.x"/>  <meta name="keywords" content=""/>  <meta name="description" content=""/>  <style type="text/css">  <!--  *{font-size:12px;font-family:verdana;color:#339933;} #contain{margin-left:64px;padding:3px;padding-bottom:7px;border:1px solid #339933;border-top:7px solid #339933;width:125px;height:145px;display:none;} [xmlns] #contain{padding-left:5px;width:113px;}  .nbox,.text{float:left;border:1px solid #339933;border-top:2px solid #339933;}  .nbox{margin:5px;}  .text{margin:5px 4px;}  a{padding:4px 8px;text-decoration:none;line-height:2;}  a:hover{background-color:#ACE89B;}  .text a{padding:5px 4px 4px 3px;}  -->  </style>  <script type="text/javascript"> function rand() {   return Math.floor(Math.random()*10); } var rangenum = new Array(); var tem; for (var i = 0; i<10; i++) {   rangenum.push(i); } for (var i = 0; i<10; i++) {   var a = rand();   var b = rand();   tem = rangenum[a];   rangenum[a] = rangenum[b];   rangenum[b] = tem; } function creatnums() {   for (i=0; i<rangenum.length; i++) {     document.writeln("<div class=/"nbox/" ><a href=/"#/"onclick=/"input("+rangenum[i]+")/">"+rangenum[i]+"</a></div>");   }   document.writeln("<div class=/"text/"><a href=/"#/" onclick='input(-1)'>退格</a><a href=/"#/" onclick=/"clearinput()/">清除</a></div>"); } function input(i) {   var pwd=document.form.pwd.value;   if (pwd.length<8||i == '-1') {     if (i == '-1') {       document.form.pwd.value = pwd.substring(0,pwd.length-1);     } else {       document.form.pwd.value = pwd+i;     }     clearTimeout(timer);     timer=setTimeout("hiddenpad();document.getElementById('OK').focus()",4000)        }   else{clearTimeout(timer);alert("最多輸入8位!");hiddenpad();} } function clearinput() {   document.form.pwd.value=""; } var timer function showpad(){   document.getElementById('contain').style.display="block";   clearTimeout(timer)   timer=setTimeout("hiddenpad()",3000) } function hiddenpad(){   document.getElementById('contain').style.display="none"; } function noinput(){ var pwd=document.form.pwd.value; document.form.pwd.value = pwd.substring(0,pwd.length-2); }  </script>  </head>  <body>  <form name="form" action="http://m.survivalescaperooms.com">   請輸入密碼  <input type="password" name="pwd" onclick="showpad()" onkeydown="return false;" size="8">  <input type="button" value=" OK " onclick="hiddenpad()" id="OK"> </form>   <div id="contain">  <script type="text/javascript">  creatnums();  </script>  </div>  </body> </html> 

以上所述是小編給大家介紹的javascript實現仿銀行密碼輸入框效果的代碼,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對武林網網站的支持!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 瓦房店市| 太仓市| 赤壁市| 延长县| 清镇市| 宝应县| 谷城县| 台南市| 克山县| 宁安市| 广昌县| 嘉祥县| 莒南县| 乐山市| 武冈市| 麻城市| 比如县| 长沙市| 葫芦岛市| 丹江口市| 师宗县| 临江市| 治县。| 舞阳县| 宝兴县| 称多县| 珠海市| 麻城市| 洪洞县| 石林| 辽阳县| 福建省| 东丽区| 兴城市| 凤庆县| 开鲁县| 嘉鱼县| 杨浦区| 松溪县| 南开区| 黔西县|