奇淫技巧

1.展示布局边界

在控制台执行如下代码后, 布局边界一目了然
[].forEach.call($$("*"),function(a){
    a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)
})

2.生成一个随机字符串

使用随机数转乘36进制转字符串

Math.random().toString(36).substring(2) 
原文地址:https://www.cnblogs.com/hanguozhi/p/10286191.html