国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 土默特右旗| 玉门市| 蒙山县| 双柏县| 河间市| 安陆市| 徐水县| 平湖市| 绥江县| 科技| 西城区| 香河县| 盐源县| 仁布县| 抚顺县| 岫岩| 精河县| 锦屏县| 东台市| 腾冲县| 阳曲县| 东方市| 赤峰市| 鄄城县| 雅安市| 铜梁县| 上林县| 房产| 迭部县| 丰都县| 东平县| 闸北区| 云林县| 天柱县| 桐乡市| 镇原县| 南京市| 上栗县| 黄浦区| 黄山市| 土默特右旗|