代码如下:
<html>
<adal>
<HTA: application
Légende = "NON"
Scroll = "non"
Showintaskbar = "non"
Innerborder = "no"
ContextMenu = "no"
Border = "Aucun"
Singleinstance = "Oui"
Fenêtre = "maximiser"
>
<Title> </Title>
<cript>
vartimer = 100;
VarrandDiv = NewArray (100);
window.onload = function ()
{
pour (vari = 0; i <randdiv.length; i ++)
{
randDiv [i] = document.CreateElement ("div");
randdiv [i] .style.csstext = "Filter: PROGID: dximageTransform.microsoft.alpha (opacité = 50);";
randdiv [i] .style.position = "absolu";
randdiv [i] .style.background = getrandomcolor ();
Document.Body.ApendChild (Randdiv [i]);
}
Amusant();
}
functionfun ()
{
pour (vari = 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);