标签:
随机数:
function randomString(length){ length = length || 32; var chars = ‘ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789‘; var maxPos = chars.length; var string = ‘‘; for (i = 0; i < length; i++) { string += chars.charAt(Math.floor(Math.random() * maxPos)); } return string; }
标签:
原文地址:http://www.cnblogs.com/hf1432/p/5041663.html