SOURCE

console 命令行工具 X clear

                    
>
console
var button = document.getElementsByTagName("button")[0]
 
 setInterval (function(){
 att()
 },1000)
 

function att(){
    var div = document.createElement("div")
    div.style.width = Math.random() * 900 + 'px'
    div.style.height = Math.random() * 900 + 'px'
    div.style.background = 'rgba(' + Math.random() * 255 + ','+ Math.random() * 255 +',' +Math.random() * 255 +','+ Math.random() +')'
    div.style.position ="absolute"
    div.style.left = Math.random() * 900 + 'px'
    div.style.top = Math.random() * 900 + 'px'
    document.body.appendChild(div)
}
<button>添加</button>