标签:style class blog c code java
function RondomPass(number){ var arr = new Array; var arr1 = new Array("0","1","2","3","4","5","6","7","8","9"); for(var i=0;i<number;i++){ var n = Math.floor(Math.random()*10); arr[i] =arr1[n] ; //document.write(arr1[n]); } val = arr.join("") //document.write(val); return val; } RondomPass(8)
适用于 随机生成密码
标签:style class blog c code java
原文地址:http://www.cnblogs.com/wesky/p/3750143.html