DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> JavaScript入門知識 >> 關於JavaScript >> Javascript模擬的DOS窗口
Javascript模擬的DOS窗口
編輯:關於JavaScript     

源代碼

<html>
<head>
<title>夏天以南</title>
<script>
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 CloseButtonClick(src)
{
    var msg1 = " CLOSE?\n\n" +
    "    系統提示: 其實, 這只是一個普通的叉叉, 不是用來關閉的~~ @o@\n\n" +
    "C:\\WINDOWS\\system32>";
    var paragraphs = src.parentNode.parentNode.parentNode.getElementsByTagName("P");
    paragraphs[paragraphs.length - 1].innerText = paragraphs[paragraphs.length - 1].innerText.replace(/_$/, "") + msg1;
}
function MaximizeButtonClick(src)
{
    var msg1 = " MAXIMIZE?\n\n" +
    "    錯了 #o#\n\n" +
    "C:\\WINDOWS\\system32>";
    var paragraphs = src.parentNode.parentNode.parentNode.getElementsByTagName("P");
    paragraphs[paragraphs.length - 1].innerText = paragraphs[paragraphs.length - 1].innerText.replace(/_$/, "") + msg1;
    CreateCmdWindow(win.document.getElementById("Frame"),
        GetRandomNum(win.document.body.clientWidth - 400),
        GetRandomNum(win.document.body.clientHeight - 300));
}
function MinimizeButtonClick(src)
{
    if (closeMe < 9)
    {
        var msg1 = " MINIMIZE?\n\n" +
        "    多按幾下 ^-^\n\n" +
        "C:\\WINDOWS\\system32>";
        var paragraphs = src.parentNode.parentNode.parentNode.getElementsByTagName("P");
        paragraphs[paragraphs.length - 1].innerText = paragraphs[paragraphs.length - 1].innerText.replace(/_$/, "") + msg1;
        closeMe++;
    }
    else
    {
        clearTimeout(timer);
    &nb

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved