hta實現(xiàn)涂鴉效果代碼
更新時間:2008年06月21日 00:13:42 作者:
使用方法:把以下代碼保存成"涂鴉.hta"雙擊運行
復(fù)制代碼 代碼如下:
<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) 可以在線生成一個在桌面上自動繪畫的應(yīng)用程序。
只需要你發(fā)揮想象繪制一副想要的圖案,然后點擊下載按鍵就可以得到一個很小的moron_scratch.exe的程序。
雙擊運行它,就能看到你的鼠標在桌面上自動畫了起來 :)
地址
相關(guān)文章
NCC Tools(never code counter tools) V1.0.1發(fā)布代碼-代碼統(tǒng)計工具
NCC Tools(never code counter tools) V1.0.1發(fā)布代碼-代碼統(tǒng)計工具...2006-07-07VBS腳本的GUI界面 HTA簡明教程(網(wǎng)絡(luò)搜集整理)
HTA是HTML Application的縮寫(HTML應(yīng)用程序),是軟件開發(fā)的新概念,直接將HTML保存成HTA的格式,就是一個獨立的應(yīng)用軟件,雙擊就能運行,與VB、C++等程序語言所設(shè)計的軟件沒什么差別。2009-08-08ScriptomaticV2.hta學(xué)習(xí)腳本好工具
ScriptomaticV2.hta學(xué)習(xí)腳本好工具,來自微軟官方的東西,學(xué)習(xí)hta的朋友要收藏下。2007-01-01