Kode sumber
<html>
<kepala>
<title>Musim Panas Selatan</title>
<skrip>
pengatur waktu var;
var menang = jendela.createPopup();
var cmdIndeks = 0;
var closeMe = 0;
var currentCmdWindow;
fungsi Saat IniCmdFokus(obj)
{
currentCmdWindow = obj;
obj.rows(0).cells(0).style.filter = "progid:DXImageTransform.Microsoft.gradient(startColorStr=#0054E3,endColorStr=#358DFB,GradientType=1)";
obj.style.zIndex = cmdIndex++;
}
fungsi Saat IniCmdBlur(obj)
{
var baris = obj.getElementsByTagName("P")[obj.getElementsByTagName("P").length - 1];
baris.innerText = baris.innerText.replace(/_$/, "");
obj.rows(0).cells(0).style.filter = "progid:DXImageTransform.Microsoft.gradient(startColorStr=#6B79B8,endColorStr=#8C9ADB,GradientType=1)";
}
fungsi CloseButtonClick(src)
{
var msg1 = " TUTUP?nn" +
"System prompt: Sebenarnya ini hanya fork biasa, bukan untuk penutupan~~ @o@nn" +
"C:\WINDOWS\system32>";
var paragraf = src.parentNode.parentNode.parentNode.getElementsByTagName("P");
paragraf[paragraf.panjang - 1].innerText = paragraf[paragraf.panjang - 1].innerText.replace(/_$/, "") + pesan1;
}
fungsi MaksimalkanButtonKlik(src)
{
var msg1 = "Maksimalkan?nn" +
"Salah#o#nn" +
"C:\WINDOWS\system32>";
var paragraf = src.parentNode.parentNode.parentNode.getElementsByTagName("P");
paragraf[paragraf.panjang - 1].innerText = paragraf[paragraf.panjang - 1].innerText.replace(/_$/, "") + pesan1;
CreateCmdWindow(win.document.getElementById("Bingkai"),
DapatkanRandomNum(win.document.body.clientWidth - 400),
GetRandomNum(win.document.body.clientHeight - 300));
}
fungsi MinimalkanButtonKlik(src)
{
jika (dekat Saya < 9)
{
var msg1 = " MINIMAL?nn" +
"Klik beberapa kali lagi^-^nn" +
"C:\WINDOWS\system32>";
var paragraf = src.parentNode.parentNode.parentNode.getElementsByTagName("P");
paragraf[paragraf.panjang - 1].innerText = paragraf[paragraf.panjang - 1].innerText.replace(/_$/, "") + pesan1;
closeMe++;
}
kalau tidak
{
batas waktu habis(pengatur waktu);
menang.sembunyikan();
window.document.body.style.display = "";
window.document.body.innerHTML = "<div style="font:32pt;font-weight:bold;color:#BE5100;"><p></p><p></p></div >";
setTimeout("Selamat Datang(0)", 400);
}
}
fungsi Selamat Datang(n)
{
var msg1 = "Selamat datang di blog 0009 ^_^";
var msg2 = " <a href=" http://0009.cnblogs.com">Klik Disini</a>";
if(n < pesan1.panjang)
{
window.document.getElementsByTagName("P")[0].innerText += msg1.substr(n, 1);
n++;
setTimeout("Selamat Datang(" + n + ")", 200);
}
kalau tidak
{
window.document.getElementsByTagName("P")[1].innerHTML = msg2;
}
}
fungsi OpenCmdWindow(tinggi)
{
jika (tinggi < window.screen.availHeight)
{
tinggi += 50;
if (tinggi >= window.screen.availHeight)
{
tinggi = window.screen.availHeight;
win.show(0, 0, window.screen.availWidth, window.screen.availHeight);
CreateCmdWindow(win.document.getElementById("Bingkai"), 10, 10);
Mengedipkan mata (benar);
}
kalau tidak
{
win.show(0, 0, window.screen.availWidth, tinggi);
}
}
lain jika (!win.isOpen)
{
win.show(0, 0, window.screen.availWidth, window.screen.availHeight);
}
timer = setTimeout("OpenCmdWindow(" + tinggi + ")", 50);
}
fungsi CreateCmdWindow(obj, kiri, atas)
{
var cmdWindow = win.document.createElement("TABEL");
cmdWindow.border = 1;
cmdWindow.className = "Cmd";
cmdWindow.style.left = kiri;
cmdWindow.style.top = atas;
cmdWindow.style.zIndex = cmdIndex++;
var newRow = cmdWindow.insertRow();
var sel baru = baris baru.insertCell();
newCell.className = "Judul";
newCell.innerHTML = "<span> C:\WINDOWS\system32\cmd.exe</span>" +
"<button onclick="window.parent.CloseButtonClick(ini);">×</button>" +
"<button onclick="window.parent.MaximizeButtonClick(ini);">□</button>" +
"<button onclick="window.parent.MinimizeButtonClick(ini);">-</button>";
baris baru = cmdWindow.insertRow();
sel baru = baris baru.insertCell();
newCell.innerHTML = "<div class="Konten">" +
"<p>Microsoft Windows XP [Versi 5.1.2600]</p>" +
"<p>(C) Hak Cipta 1985-2001 Microsoft Corp.</p>" +
"<p> </p>" +
"<p>C:\WINDOWS\system32></p>" +
"<div class="Menghiasi"></div>" +
"</div>";
cmdWindow.onactivate = fungsi (){ window.parent.CurrentCmdFocus(ini }
cmdWindow.ondeactivate = function (){ window.parent.CurrentCmdBlur(ini }
obj.appendChild(cmdWindow);
}
fungsi Mengedipkan mata (tampilkan)
{
if(currentCmdWindow != tidak terdefinisi && currentCmdWindow != null)
{
var baris = currentCmdWindow.getElementsByTagName("P")[currentCmdWindow.getElementsByTagName("P").length - 1];
jika (tunjukkan)
{
baris.innerText += "_";
}
kalau tidak
{
baris.innerText = baris.innerText.replace(/_$/, "");
}
}
setTimeout("Wink(" + !tampilan + ")", 500);
}
fungsi GetRandomNum(maks)
{
return parseInt(Matematika.random() * maks + 1);
}
jendela.onload = fungsi()
{
win.document.body.innerHTML = "<div id="Frame" onselectstart="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", "lebar: 100%; tinggi: 100%; latar belakang: #3A6EA5;");
win.document.styleSheets[0].addRule(".Cmd", "latar belakang: #fff; posisi: absolut; lebar: 670px; tinggi: 440px; ukuran font: 10pt; warna: #fff; kursor: default;" );
win.document.styleSheets[0].addRule(".Title", "filter: progid:DXImageTransform.Microsoft.gradient(startColorStr=#6B79B8,endColorStr=#8C9ADB,GradientType=1); tinggi: 24 piksel; berat font: berani;");
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; batas: awal 2px #fff;");
win.document.styleSheets[0].addRule(".Content", "latar belakang: #000; tinggi: 100%; overflow-y: gulir; scrollbar-wajah-warna: #ece9d8; scrollbar-highlight-color: #ffffff ;
win.document.styleSheets[0].addRule(".Konten p", "margin: 0px; tinggi garis: 16px;");
win.document.styleSheets[0].addRule(".Content .Adorn", "height: 4000px;");
OpenCmdWindow(0);
}
</skrip>
</kepala>
<body style="display: tidak ada;"></body>
</html>