hta实现涂鸦效果代码

所属分类: 脚本专栏 / hta 阅读数: 601
收藏 0 赞 0 分享
复制代码 代码如下:

<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的程序。
双击运行它,就能看到你的鼠标在桌面上自动画了起来 :)
地址
更多精彩内容其他人还在看

超简陋浏览器

超简陋浏览器
收藏 0 赞 0 分享

MyHTML Player release v1.1

MyHTML Player release v1.1
收藏 0 赞 0 分享

ScriptomaticV2.hta学习脚本好工具

ScriptomaticV2.hta学习脚本好工具,来自微软官方的东西,学习hta的朋友要收藏下。
收藏 0 赞 0 分享

tweakomatic hta 下载

tweakomatic hta 下载
收藏 0 赞 0 分享

用来通知论坛有新贴子的hta代码

用来通知论坛有新贴子的hta代码
收藏 0 赞 0 分享

用hta与ajax实现的五笔字型编码查询工具

用hta与ajax实现的五笔字型编码查询工具
收藏 0 赞 0 分享

用vbs在 HTA 内对脚本进行编码的方法

用vbs在 HTA 内对脚本进行编码的方法
收藏 0 赞 0 分享

用vbs如何确定在 HTA 中选择了哪些文本?

用vbs如何确定在 HTA 中选择了哪些文本?
收藏 0 赞 0 分享

创建一个在标题栏中没有“关闭”按钮的 HTA

创建一个在标题栏中没有“关闭”按钮的 HTA
收藏 0 赞 0 分享

hta实现的涂鸦效果

hta实现的涂鸦效果
收藏 0 赞 0 分享
查看更多