日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Password Creator(HTA)

發布時間:2023/12/10 编程问答 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Password Creator(HTA) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
<!--
-?功能:????生成隨機密碼
-?輸入:????用戶的設置
-?輸出:????隨機密碼,同時拷貝到剪切板
-?作者:????maskx
-?版本:????v1.0
-?歷史紀錄:????2007-7-11新建????
-?創建時間:????2007-7-11
-?最后修改時間:2007-7-11??

-->

<html>
<head>
????
<title>Password?Creator</title>
????
<hta:application?id="objHTAPasswordCreator"?applicationname="HTAPasswordCreator"?scroll="no"
????????singleinstance
="yes">
</head>
<style>
BODY
{}{
???background-color
:?buttonface;
???font-family
:?Helvetica;
???font-size
:?10pt;
???margin-top
:?10px;
???margin-left
:?20px;
???margin-right
:?20px;
???margin-bottom
:?10px;
}

</style>
<script?language="VBScript">
'生成隨機密碼
??Function?UserGetPassword()
????
Dim?strPassword
????
Dim?strAll,pwdLen
????
Randomize
????strAll
=""
????pwdLen
=0
????
if?ckUpper.checked?then
????????strAll
=?strAll?&?"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
????
end?if
????
if?ckLower.checked?then
????????strAll
=?strAll?&?"abcdefghijklmnopqrstopwxyz"
????
end?if
????
if?ckNum.checked?then
????????strAll
=?strAll?&?"0123456789"
????
end?if
????
if?ckSpecial.checked?then
????????strAll
=?strAll?&?"~!@#$%^&*()_+[]\;',./{}|:<>?"
????
end?if
????
if?strAll=""?then
????????
MsgBox?"請選擇密碼內容"
????????
exit?function
????
end?if
????
if?RDConst.checked?then
????????pwdLen
=cmbConstLen.selectedIndex+1
????
else
????????
if?cmbHeigh.selectedIndex?<?cmbLow.selectedIndex?then
????????????
MsgBox?"密碼長度最大值應該大于最小值"
????????????
exit?function
????????
end?if
????????pwdLen
=Int((cmbHeigh.selectedIndex?-?cmbLow.selectedIndex?+?1))?*?Rnd?+?cmbLow.selectedIndex?+1
????
end?if

????strPassword
=RoundStr(strAll,pwdLen)
????TxtPWD.Value
=strPassword
????document.parentwindow.clipboardData.SetData?
"text",?strPassword
??
End?Function
??
??
Function?RoundStr(?str,Num)?
????s?
=?""?
????
for?i?=?1?to?Num?
????????
Randomize?
????????strLen?
=?Len(str)?
????????t?
=?Round((RND?*?(strLen-1))+1)?????
????????s?
=?s?&?Mid(str,t,1)?
????
Next?
????RoundStr?
=?s?
End?Function?

</script>

<body>
????
<table?cellpadding="0"?cellspacing="0"?width="100%">
????????
<tr>
????????????
<td?align="center">
????????????????點擊"生成密碼"按鈕?
<br/>?在生成密碼的同時也將密碼拷貝進剪切板
????????????????
<br/><br/>
????????????
</td>
????????
</tr>
????????
<tr>
????????????
<td?align="center">
????????????????
<table?cellpadding="0"?cellspacing="0">
????????????????????
<tr>
????????????????????????
<td?style="width:?114px;?height:?18px">
????????????????????????????密碼內容
</td>
????????????????????????
<td?style="height:?18px">
????????????????????????????
<input?id="ckNum"?checked="checked"?type="checkbox"?/>數字
????????????????????????
</td>
????????????????????????
<td?style="height:?18px">
????????????????????????????
<input?id="ckLower"?checked="checked"?type="checkbox"?/>小寫字母
????????????????????????
</td>
????????????????????
</tr>
????????????????????
<tr>
????????????????????????
<td?style="width:?114px;?height:?20px">
????????????????????????????
&nbsp;</td>
????????????????????????
<td?style="height:?20px">
????????????????????????????
<input?id="ckSpecial"?checked="checked"?type="checkbox"?/>特殊字符</td>
????????????????????????
<td?style="height:?20px">
????????????????????????????
<input?id="ckUpper"?checked="checked"?type="checkbox"?/>大寫字母</td>
????????????????????
</tr>
????????????????????
<tr>
????????????????????????
<td?style="width:?114px">
????????????????????????????密碼長度
</td>
????????????????????????
<td>
????????????????????????????
<input?id="RDConst"?type="radio"?checked="CHECKED"?name="pwdLen"?/>固定長度</td>
????????????????????????
<td>
????????????????????????????
<select?id="cmbConstLen">
????????????????????????????????
<option>1</option>
????????????????????????????????
<option>2</option>
????????????????????????????????
<option>3</option>
????????????????????????????????
<option>4</option>
????????????????????????????????
<option>5</option>
????????????????????????????????
<option>6</option>
????????????????????????????????
<option>7</option>
????????????????????????????????
<option?selected="selected">8</option>
????????????????????????????????
<option>9</option>
????????????????????????????????
<option>10</option>
????????????????????????????????
<option>11</option>
????????????????????????????????
<option>12</option>
????????????????????????????????
<option>13</option>
????????????????????????????????
<option>14</option>
????????????????????????????????
<option>15</option>
????????????????????????????????
<option>16</option>
????????????????????????????????
<option>17</option>
????????????????????????????????
<option>18</option>
????????????????????????????????
<option>19</option>
????????????????????????????????
<option>20</option>
????????????????????????????
</select>
????????????????????????
</td>
????????????????????
</tr>
????????????????????
<tr>
????????????????????????
<td?style="width:?114px">
????????????????????????
</td>
????????????????????????
<td>
????????????????????????????
<input?id="RDRandm"?type="radio"?name="pwdLen"?/>變化長度</td>
????????????????????????
<td>
????????????????????????????
<select?id="cmbLow">
????????????????????????????????
<option>1</option>
????????????????????????????????
<option?selected="selected">2</option>
????????????????????????????????
<option>3</option>
????????????????????????????????
<option>4</option>
????????????????????????????????
<option>5</option>
????????????????????????????????
<option>6</option>
????????????????????????????????
<option>7</option>
????????????????????????????????
<option>8</option>
????????????????????????????????
<option>9</option>
????????????????????????????????
<option>10</option>
????????????????????????????????
<option>11</option>
????????????????????????????????
<option>12</option>
????????????????????????????????
<option>13</option>
????????????????????????????????
<option>14</option>
????????????????????????????????
<option>15</option>
????????????????????????????????
<option>16</option>
????????????????????????????????
<option>17</option>
????????????????????????????????
<option>18</option>
????????????????????????????????
<option>19</option>
????????????????????????????????
<option>20</option>
????????????????????????????
</select>
????????????????????????????-
????????????????????????????
<select?id="cmbHeigh">
????????????????????????????????
<option>1</option>
????????????????????????????????
<option>2</option>
????????????????????????????????
<option>3</option>
????????????????????????????????
<option>4</option>
????????????????????????????????
<option>5</option>
????????????????????????????????
<option>6</option>
????????????????????????????????
<option>7</option>
????????????????????????????????
<option>8</option>
????????????????????????????????
<option>9</option>
????????????????????????????????
<option>10</option>
????????????????????????????????
<option?selected="selected">11</option>
????????????????????????????????
<option>12</option>
????????????????????????????????
<option>13</option>
????????????????????????????????
<option>14</option>
????????????????????????????????
<option>15</option>
????????????????????????????????
<option>16</option>
????????????????????????????????
<option>17</option>
????????????????????????????????
<option>18</option>
????????????????????????????????
<option>19</option>
????????????????????????????????
<option>20</option>
????????????????????????????
</select>
????????????????????????
</td>
????????????????????
</tr>
????????????????
</table>
????????????
</td>
????????
</tr>
????????
<tr>
????????
????????????
<td?align="center">
????????????
<br?/><br?/>
????????????????
<table>
????????????????????
<tr>
????????????????????????
<td>
????????????????????????????
<input?type="text"?name="TxtPWD"?width="100%"?style="width:?209px"></td>
????????????????????????
<td>
????????????????????????????
<input?id="btnCreatePWD"?class="button"?type="button"?value="生成密碼"?name="btnCreatePWD"
????????????????????????????????onclick
="UserGetPassword">
????????????????????????
</td>
????????????????????
</tr>
????????????????
</table>
????????????
</td>
????????
</tr>
????
</table>
</body>
</html>

轉載于:https://www.cnblogs.com/maskx/archive/2007/07/23/828717.html

總結

以上是生活随笔為你收集整理的Password Creator(HTA)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。