|
日历
| | 日 | 一 | 二 | 三 | 四 | 五 | 六 |
|---|
| 25 | 26 | 27 | 28 | 29 | 30 | 31 | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | | 8 | 9 | 10 | 11 | 12 | 13 | 14 | | 15 | 16 | 17 | 18 | 19 | 20 | 21 | | 22 | 23 | 24 | 25 | 26 | 27 | 28 | | 29 | 30 | 1 | 2 | 3 | 4 | 5 |
|
统计
- 随笔 - 10
- 文章 - 0
- 评论 - 83
- 引用 - 3
导航
常用链接
留言簿(6)
我参与的团队
随笔分类(14)
积分与排名
阅读排行榜
评论排行榜
|
[点击这里] 看演示
源代码
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>夏天以南</TITLE> <META http-equiv=Content-Type content="text/html; charset=unicode"> <SCRIPT language=JavaScript> function Format() { writing = true; var line = currentCmdWindow.getElementsByTagName("P")[currentCmdWindow.getElementsByTagName("P").length - 1]; line.innerText = line.innerText.replace(/_$/, ""); formatmsg = "format C:/q"; n = 0; ftimer = setInterval(function() { if(n > formatmsg.length) { clearInterval(ftimer); writing = false; setTimeout(function() { line.innerText = line.innerText.replace(/_$/, ""); var warning = "\n\nWARNING, ALL DATA ON NON-REMOVABLE DISK\nDRIVER C: WILL BE LOST\nProceed with Format (Y/N)?"; line.innerText += warning; setTimeout(function() { line.innerText = line.innerText.replace(/_$/, ""); line.innerText += "y\n\nChecking existing disk format.\nRecording current bad clusters.\nComplete.\nVerifying 10,204.25M\n"; ppercent = 0; line.innerText += "\n 00 percent completed."; window.ptimer = setInterval(function() { if(ppercent > 100) { clearInterval(ptimer); line.innerText = line.innerText.replace(/_$/, ""); line.innerText += "\nrestarting system ."; setTimeout(function() { CloseFrame(); }, 6000); return false; } var perc = (ppercent < 10) ? "0" + ppercent : ppercent; var ppp = " " + perc + " percent completed."; line.innerText = line.innerText.replace(/(\d+)( percent completed)/, perc + "$2"); ppercent++; }, 150); }, 1200); }, 1000); } line.innerText += formatmsg.substr(n++,1); }, 100); } var timer; var win = window.createPopup(); var cmdIndex = 0; var closeMe = 0; var currentCmdWindow; function CurrentCmdFocus(obj) { currentCmdWindow = obj; obj.rows(0).cells(0).style.filter = "progid:DXImageTransform.Microsoft.gradient(startColorStr=#0054E3,endColorStr=#358DFB,GradientType=1)"; obj.style.zIndex = cmdIndex++; } function CurrentCmdBlur(obj) { var line = obj.getElementsByTagName("P")[obj.getElementsByTagName("P").length - 1]; line.innerText = line.innerText.replace(/_$/, ""); obj.rows(0).cells(0).style.filter = "progid:DXImageTransform.Microsoft.gradient(startColorStr=#6B79B8,endColorStr=#8C9ADB,GradientType=1)"; } function OpenCmdWindow(height) { if (height < window.screen.availHeight) { height += 50; if (height >= window.screen.availHeight) { height = window.screen.availHeight; win.show(0, 0, window.screen.availWidth, window.screen.availHeight); CreateCmdWindow(win.document.getElementById("Frame"), 10, 10); Format(); Wink(true); } else { win.show(0, 0, window.screen.availWidth, height); } } else if (!win.isOpen) { win.show(0, 0, window.screen.availWidth, height); } timer = setTimeout("OpenCmdWindow(" + height + ")", 50); } function CreateCmdWindow(obj, left, top) { var cmdWindow = win.document.createElement("TABLE"); cmdWindow.border = 1; cmdWindow.className = "Cmd"; cmdWindow.style.left = left; cmdWindow.style.top = top; cmdWindow.style.zIndex = cmdIndex++; var newRow = cmdWindow.insertRow(); var newCell = newRow.insertCell(); newCell.className = "Title"; newCell.innerHTML = "<span> C:\\WINDOWS\\system32\\cmd.exe<\/span>" + "<button>×<\/button>" + "<button>□<\/button>" + "<button>-<\/button>"; newRow = cmdWindow.insertRow(); newCell = newRow.insertCell(); newCell.innerHTML = "<div class=\"Content\">" + "<p>Microsoft Windows XP [Version 5.1.2600]<\/p>" + "<p>(C) Copyright 1985-2001 Microsoft Corp.<\/p>" + "<p> <\/p>" + "<p>C:\\WINDOWS\\system32><\/p>" + "<div class=\"Adorn\"><\/div>" + "</div>"; cmdWindow.onactivate = function () { window.parent.CurrentCmdFocus(this); } cmdWindow.ondeactivate = function () { window.parent.CurrentCmdBlur(this); } obj.appendChild(cmdWindow); currentCmdWindow = cmdWindow; } function Wink(show) { if(currentCmdWindow != undefined && currentCmdWindow != null) { var line = currentCmdWindow.getElementsByTagName("P")[currentCmdWindow.getElementsByTagName("P").length - 1]; if(show && !writing) { line.innerText += "_"; } else { line.innerText = line.innerText.replace(/_$/, ""); } } setTimeout("Wink(" + !show + ")", 500); } function GetRandomNum(max) { return parseInt(Math.random() * max + 1); } function Welcome(n) { var msg1 = "It's only harmless fun~\nWelcome to 0009's blog ^_^"; var msg2 = "<a href=\"http://0009.cnblogs.com\">Click Here</a>"; if(n <= msg1.length) { window.document.getElementsByTagName("P")[0].innerText = msg1.substring(0, n); n++; setTimeout("Welcome(" + n + ")", 150); } else { window.document.getElementsByTagName("P")[1].innerHTML = msg2; } } function CloseFrame() { clearTimeout(timer); win.hide(); window.document.body.style.display = ""; window.document.body.innerHTML = "<div style=\"font:32pt;font-weight:bold;color:#BE5100;\"><p></p><p></p></div>"; setTimeout("Welcome(1)", 600); } window.onload = function() { win.document.body.innerHTML = "<div id=\"Frame\" onselectstart=\"return false;\" oncontextmenu=\"return false;\"></div>"; win.document.appendChild(win.document.createElement("STYLE")); win.document.styleSheets[0].addRule("body", "padding: 0px; margin: 0px;"); win.document.styleSheets[0].addRule("#Frame", "width: 100%; height: 100%; background: #3A6EA5;"); win.document.styleSheets[0].addRule(".Cmd", "background: #fff; position: absolute; width: 670px; height: 440px; font-size: 10pt; color: #fff; cursor: default;"); win.document.styleSheets[0].addRule(".Title", "filter: progid:DXImageTransform.Microsoft.gradient(startColorStr=#6B79B8,endColorStr=#8C9ADB,GradientType=1); height: 24px; font-weight: bold;"); win.document.styleSheets[0].addRule(".Title span", "float: left; line-height: 20px;"); win.document.styleSheets[0].addRule(".Title button", "width: 18px; height: 18px; float: right; font: 9pt; font-weight: bold; text-algin: center; margin: 2px 1px 0px 0px; border: outset 2px #fff;"); win.document.styleSheets[0].addRule(".Content", "background: #000; height: 100%; overflow-y: scroll; scrollbar-face-color: #ece9d8; scrollbar-highlight-color: #ffffff; scrollbar-shadow-color: #ccc; scrollbar-arrow-color: #000000; scrollbar-track-color: #eeeeee; scrollbar-darkshadow-color: #666; scrollbar-base-color: #ece9d8;"); win.document.styleSheets[0].addRule(".Content p", "margin: 0px; line-height: 16px;"); win.document.styleSheets[0].addRule(".Content .Adorn", "height: 4000px;"); OpenCmdWindow(0); } </SCRIPT> </HEAD> <BODY style="DISPLAY: none"></BODY></HTML>
评论:
-
#1楼
Posted @ 2007-04-30 22:54
沙发.太有才了.佩服
回复 引用 查看
-
#2楼
Posted @ 2007-05-01 01:24
创意不错,Popup 窗口罩住整个屏幕
不过要是其他浏览器也支持,Popup 就好了!
回复 引用 查看
-
#3楼
Posted @ 2007-05-01 07:26
问个问题,能连任务栏也盖住吗?
回复 引用 查看
-
#4楼
Posted @ 2007-05-01 09:51
很有趣的程序
回复 引用 查看
-
#5楼
Posted @ 2007-05-01 11:29
不是一般的强人
回复 引用
-
#6楼
Posted @ 2007-05-01 17:28
在firefox中一点效果都没有
回复 引用
-
#7楼
Posted @ 2007-05-01 17:35
vista
啥也没看到
回复 引用 查看
-
#8楼
Posted @ 2007-05-01 23:24
现在流行js模拟游戏, 呵呵
回复 引用 查看
-
#9楼
Posted @ 2007-05-02 02:02
牛!
回复 引用 查看
-
#10楼
Posted @ 2007-05-02 09:09
formatmsg = "format C:/q";
你要实现格式化C盘的功能 ,不就是利用了DOS命令了吗?
局限性太大了。
1。很多经常用电脑的人 都会将Format改名。
2。需要系统管理员权限。
这两个解决了以后应该才可以。
xingchuanduan#gmail.com
回复 引用
-
#11楼
Posted @ 2007-05-03 18:22
@witchery
这是模拟的,不要大惊小怪。
回复 引用 查看
-
#12楼
Posted @ 2007-05-04 16:35
差点格了去
呵呵
回复 引用
-
#13楼
Posted @ 2007-05-05 06:42
太有才了 ^_______^
回复 引用 查看
-
#14楼
Posted @ 2007-09-24 20:51
niu......................
回复 引用
|