国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > HTML > 正文

hta實現(xiàn)的涂鴉效果

2024-08-26 00:15:47
字體:
供稿:網(wǎng)友
hta:HTML Applications 
hta是html的可執(zhí)行程序,制作很簡單,將文件*.htm改為*.hta就可以了。
不過hta有自己獨有的標簽<hta>,并可設(shè)置其屬性達到很不錯的效果。
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> 
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); 
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 永平县| 石楼县| 抚宁县| 杭锦后旗| 当雄县| 原平市| 五大连池市| 莱阳市| 将乐县| 黔南| 河津市| 武城县| 怀化市| 德昌县| 白朗县| 堆龙德庆县| 兴业县| 广昌县| 灵石县| 崇信县| 会理县| 大洼县| 苍梧县| 临安市| 平利县| 锦州市| 浦北县| 象州县| 潼关县| 临武县| 华宁县| 陕西省| 曲阜市| 长宁县| 奉节县| 慈利县| 揭阳市| 定兴县| 丹棱县| 彩票| 庆阳市|