JS常用功能

JS随机字符串
Math.random().toString(16).substring(2); //8位 Math.random().toString(36).substring(2); //16位
JS最大值和最小值
Math.max.apply(Math, [1,2,3]) //3 Math.min.apply(Math, [1,2,3]) //1
 
posted @ 2015-01-08 16:22  eaysun  阅读(162)  评论(0编辑  收藏  举报