Graffiti effect implemented by HTA

Source: Internet
Author: User

HTA: HTML Applications
HTA is HTML executable. Program The file *. htm is changed to *. HTA.
However, HTA has its own unique tag <HTA> and can set its attributes to achieve good results.
HTA is an excellent choice for creating small programs.
The following is an example. It was written a few days ago when the company was bored.
Code : Copy code The Code is as follows: <HTML>
<Head>
<HTA: Application
Caption = "no"
Scroll = "no"
Showintaskbar = "no"
Innerborder = "no"
Contextmenu = "no"
Border = "NONE"
Singleinstance = "yes"
Windowstate = "maximize"
>
<Title> 0009.cnblogs.com </title>
<SCRIPT>
VaR timers = 100;
VaR randdiv = new array (100 );
Window. onload = function ()
{
For (VAR I = 0; I <randdiv. length; I ++)
{
Randdiv [I] = Document. createelement ("Div ");
Randdivpolici2.16.style.css text = "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. randdom () * 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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.