内容显示页
 
类别:JavaScript | 浏览(65) | 2007-12-4 10:57:57

使用方法:把以下代码保存成"涂鸦.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 onclick="window.close()">
</body>
</html>


转载自:http://www.readlog.cn/show-227-1.htm

还有个在线生成的:

木容涂鸦板(Moron Scratch) 可以在线生成一个在桌面上自动绘画的应用程序。
只需要你发挥想象绘制一副想要的图案,然后点击下载按键就可以得到一个很小的moron_scratch.exe的程序。
双击运行它,就能看到你的鼠标在桌面上自动画了起来 :)

链接:http://www.moron.cn/


引用本页地址:http://www.yongfa365.com/item/hta-Shi-Xian-Tu-Ya-Xiao-Guo.html
 
 
相关链接
 
网友评论:
姓名: 记住我
网址:
邮箱:
内容:
验证码:  验证码图片看不清? 换张图试试
 
   
 
 
文章分类
 
 
专题(3)
 
ASP+VBS(141)
 
 
 
 
Linux(10)
 
 
SQL(55)
 
web 2.0(22)
 
 
 
 
 
 
心程(48)
 
生活(71)
 
创业(5)
 
   

power by :柳永法(yongfa365)'Blog | model by :hibaidu | css by:众网友 | 京ICP备07011491号   我要统计  

本空间赞助商:北京中科兴联信息技术有限公司

QQ:64049027    E-mail:64049027<at>qq.com