代码如下:
<html>
<head>
<hta:application
caption=no
scroll=no
showintaskbar=no
innerborder=no
contextmenu=no
border=none
singleinstance=yes
windowstate=maximize
>
<title></title>
<script>
var timer = 100;
var randdiv = new array(100);
window.onload = function()
{
for(var i = 0; i < randdiv.length; i++)
{
randdiv[i] = document.createelement(div);
randdiv[i].style.csstext = filter:progid:dximagetransform.microsoft.alpha(opacity=50);;
randdiv[i].style.position = absolute;
randdiv[i].style.background = getrandomcolor();
document.body.appendchild(randdiv[i]);
}
fun();
}
function fun()
{
for(var i = 0; i < randdiv.length; i++)
{
randdiv[i].style.top = math.floor(math.random() * window.screen.height);
randdiv[i].style.left = math.floor(math.random() * window.screen.width);
randdiv[i].style.width = math.floor(math.random() * 100);
randdiv[i].style.height = math.floor(math.random() * 100);
randdiv[i].style.background = getrandomcolor();
}
settimeout(fun(), timer);
}
function getrandomcolor()
{
var r = math.floor(math.random() * 255).tostring(16);
var g = math.floor(math.random() * 255).tostring(16);
var b = math.floor(math.random() * 255).tostring(16);
r = r.length == 1 ? 0 + r : r;
g = g.length == 1 ? 0 + g : g;
b = b.length == 1 ? 0 + b : b;
return # + r + g + b;
}
</script>
</head>
<body>
</body>
</html>
木容涂鸦板(moron scratch) 可以在线生成一个在桌面上自动绘画的应用程序。
只需要你发挥想象绘制一副想要的图案,然后点击下载按键就可以得到一个很小的moron_scratch.exe的程序。
双击运行它,就能看到你的鼠标在桌面上自动画了起来 :)
2025国考·省考课程试听报名