HTA:htmlapplications
HTAは、HTMLの実行可能プログラムです。作るのはとても簡単です。ファイル *.htmを *.htaに変更するだけです。
ただし、HTAには独自のタグ<hta>があり、非常に良い結果を達成するためにプロパティを設定できます。
HTAは、ミニプログラムを作成するのに最適な選択肢です。
数日前に会社が退屈していた例が書かれています。
コード:
コードは次のとおりです。
<html>
<head>
<HTA:アプリケーション
キャプション= "いいえ"
scroll = "no"
showintaskbar = "no"
innerborder = "no"
contextmenu = "no"
border = "なし"
singleInstance = "はい"
Window -state = "Maximize"
>
<title> 0009.cnblogs.com </title>
<スクリプト>
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:dmimagetransform.microsoft.alpha(opacity = 50);";
randdiv [i] .style.position = "absolute";
randdiv [i] .style.background = getRandomColor();
document.body.appendChild(randdiv [i]);
}
楽しい();
}
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();
}
setimeout( "fun()"、タイマー);
}
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);