这是一款密码随机生成效果,可根据自己的需求来修改生成规则及范围,是一款实用js随机生成脚本代码。
<html> <head> <meta http-equiv="content-Type" content="text/html;charset=gb2312"> <meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren"> <meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。"> <title>js自动随机生成密码特效分享_武鸣人</title> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function getRandomNum(lbound, ubound) { return (Math.floor(Math.random() * (ubound - lbound)) + lbound); }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) function getRandomChar(number, lower, upper, other, extra) { var numberChars = "0123456789"; var lowerChars = "abcdefghijklmnopqrstuvwxyz"; var upperChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var otherChars = "`~!@#$%^&*()-_=+[{]}\\|;:'\",<.>/? "; var charSet = extra; if (number == true) charSet += numberChars; if (lower == true) charSet += lowerChars; if (upper == true) charSet += upperChars; if (other == true) charSet += otherChars; return charSet.charAt(getRandomNum(0, charSet.length)); } function getPassword(length, extraChars, firstNumber, firstLower, firstUpper, firstOther, latterNumber, latterLower, latterUpper, latterOther) { var rc = ""; if (length > 0) rc = rc + getRandomChar(firstNumber, firstLower, firstUpper, firstOther, extraChars); for (var idx = 1; idx < length; ++idx) { rc = rc + getRandomChar(latterNumber, latterLower, latterUpper, latterOther, extraChars); } return rc; }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) // End --> </script> </head> <body> <a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <table width=80% border=0> <tr align=center> <td> <form name="myform"> <table border=0> <tr> <td> 密码前几位包括: </td> <td> <input type=checkbox name=firstNumber checked>数字 <input type=checkbox name=firstLower checked>小写字母 <input type=checkbox name=firstUpper checked>大写字母 <input type=checkbox name=firstOther>其它 </td> </tr> <tr> <td> 密码后几位包括: </td> <td> <input type=checkbox name=latterNumber checked>数字 <input type=checkbox name=latterLower checked>小写字母 <input type=checkbox name=latterUpper checked>大写字母 <input type=checkbox name=latterOther>其它 </td> </tr> <tr> <td> 密码长度: </td> <td> <input type=text name=passwordLength value="8" size=3> </td> </tr> <tr> <td> 自定密码特征: </td> <td> <input type=text name=extraChars size=20> </td> </tr> <tr> <td colspan=2> 密码: <input type=text name=password size=20> <input type=button value="产生密码" onClick="document.myform.password.value = getPassword(document.myform.passwordLength.value, document.myform.extraChars.value, document.myform.firstNumber.checked, document.myform.firstLower.checked, document.myform.firstUpper.checked, document.myform.firstOther.checked, document.myform.latterNumber.checked, document.myform.latterLower.checked, document.myform.latterUpper.checked, document.myform.latterOther.checked);"> </form> </td> </tr> </table> </body> </html>
本文来自武鸣人网站,转载请注明出处