今天迎来了2018年第一场雪,这个美好的日子,总的写点什么纪念一下,在这里写了一个在js中使用Math.random()函数,随机生成四位数的验证码及其验证码换颜色. js代码如下: var arrayTest= ["m","n","v","x","z","a","b","c","d","e","f…
js生成随即字符串 /* *js生成随即字符串原来如此简单 *toString() radix argument must be between 2 and 36 */ function uuid() { return Math.random().toString(36).substring(3, 8) } //7rh32…
js生成当前时间 var today=new Date(); function itArray(){ this.length=itArray.arguments.length for(var i=0;i<this.length;i++) this[i+1]=itArray.arguments[i]} var d=new itArray("星期日","星期一","星期二","星期三","星期四",&qu…