Math.random().toString(16).substring(2) // 固定13位 Math.random().toString(36).substring(2)//倍数不固定 22-26位
参考:
Javascript 生成随机数
原文:http://www.cnblogs.com/huangtailang/p/7411302.html