手机
当前位置:查字典教程网 >脚本专栏 >hta >hta实现的涂鸦效果
hta实现的涂鸦效果
摘要:hta:HTMLApplicationshta是html的可执行程序,制作很简单,将文件*.htm改为*.hta就可以了。不过hta有自己独...

hta:HTMLApplications

hta是html的可执行程序,制作很简单,将文件*.htm改为*.hta就可以了。

不过hta有自己独有的标签<hta>,并可设置其属性达到很不错的效果。

hta是制作小程序绝佳选择。

下面是一个例子,几天前在公司无聊时写的。

代码:

复制代码 代码如下:

<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>

vartimer=100;

varrandDiv=newArray(100);

window.onload=function()

{

for(vari=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();

}

functionFun()

{

for(vari=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);

}

functionGetRandomColor()

{

varr=Math.floor(Math.random()*255).toString(16);

varg=Math.floor(Math.random()*255).toString(16);

varb=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>

【hta实现的涂鸦效果】相关文章:

ASP 辅助工具(hta版)

如何使一个HTA位于屏幕中心(Win32_DesktopMonitor)

tweakomatic hta 下载

用hta实现制作的无殇 - 快书V1.1打包下载了第1/2页

用hta实现的桌面漂浮flash

适用于hta的Sleep函数

hta编写的消费记录程序

hta实现的笨狼树状节点查看器

hta实现涂鸦效果代码

hta文件介绍(编写小程序的好东东)

精品推荐
分类导航