js随机生成N位数

function RondomPass(number){
var arr = new Array;
var arr1 = new Array("","","","","","","","","",""); for(var i=;i<number;i++){
var n = Math.floor(Math.random()*);
arr[i] =arr1[n] ;
//document.write(arr1[n]);
} val = arr.join("")
//document.write(val);
return val; }
RondomPass()

适用于 随机生成密码

上一篇:JQ中mouseover和mouseenter的区别


下一篇:jquery移除事件,绑定事件,触发事件