查看: 800|回复: 4
|
Dreamweaver FX_PassGeneroator problem?
[复制链接]
|
|
<script type="text/javascript">
请问如何修改只是要号码,且只要五位数字,谢谢!
<!--
function FX_passGenerator(form,element) {
var thePass = "";
var randomchar = "";
var numberofdigits = Math.floor((Math.random() * 7) + 6);
for (var count=1; count<=numberofdigits; count++) {
var chargroup = Math.floor((Math.random() * 3) + 1);
if (chargroup==1) {
randomchar = Math.floor((Math.random() * 26) + 65);
}
if (chargroup==2) {
randomchar = Math.floor((Math.random() * 10) + 48);
}
if (chargroup==3) {
randomchar = Math.floor((Math.random() * 26) + 97);
}
thePass+=String.fromCharCode(randomchar);
}
eval('document.'+form+'.'+element+'.value = thePass');
}
//-->
</script> |
|
|
|
|
|
|
|
发表于 18-7-2007 09:52 AM
|
显示全部楼层
|
|
|
|
|
|
|

楼主 |
发表于 18-7-2007 11:28 AM
|
显示全部楼层
这是random password generator的 script,但我想修改code后,random generate 出来的password 只有五个数子的号码,谢谢! |
|
|
|
|
|
|
|
发表于 18-7-2007 11:57 AM
|
显示全部楼层
|
|
|
|
|
|
|

楼主 |
发表于 18-7-2007 02:00 PM
|
显示全部楼层
回复 #4 thkee 的帖子
thank you very much! u r nice guy |
|
|
|
|
|
|
| |
本周最热论坛帖子
|