网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的范文:

 

标题 hta实现涂鸦效果代码
范文
    代码如下:
    <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的程序。
    双击运行它,就能看到你的鼠标在桌面上自动画了起来 :)
随便看

 

在线学习网范文大全提供好词好句、学习总结、工作总结、演讲稿等写作素材及范文模板,是学习及工作的有利工具。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/19 6:45:10