c " /> 一区二区三区四区高清精品免费观看,欧美巨大丰满猛性社交,亚洲免费小视频

色尼玛亚洲综合影院,亚洲3atv精品一区二区三区,麻豆freexxxx性91精品,欧美在线91

一個用js實現控制臺控件的代碼

復制代碼 代碼如下:
<body margin="0">
</body>
<script>
    function Console(width,height,command)
    {
        var container=document.createElement("div");
        this.container=container;

        container.runtimeStyle.width=(width);
        container.runtimeStyle.height=(height);
        container.runtimeStyle.margin="0px";
        container.runtimeStyle.backgroundColor="black";
        container.runtimeStyle.fontFamily="Terminal";
        container.runtimeStyle.color="white";
        container.runtimeStyle.fontSize="16px";
        this.output=document.createElement("div");
        container.appendChild(this.output);
        container.innerHTML+="js>"
        this.input=document.createElement("input");
        container.appendChild(this.input);
        this.input.runtimeStyle.backgroundColor="black";
        this.input.runtimeStyle.borderWidth="0px";
        this.input.runtimeStyle.color="white";
        this.input.runtimeStyle.fontFamily="Terminal";
        this.input.runtimeStyle.width="90%"
        this.input.runtimeStyle.fontSize="16px"
        this.input.runtimeStyle.position="relative";
        this.input.runtimeStyle.top="2px";
        command=command||function(str)
        {

            var e;
            try{
                var r=eval(str);
            } catch(e) {
                return "Bad command";
            }
            return r;

        }

        this.input.command=function()
        {
            this.parentNode.childNodes[0].innerHTML+=this.value+'<br/>'
            this.parentNode.childNodes[0].innerHTML+=(command(this.value)+"<br/>")

        }
        this.input.onkeyup=new Function("e","e=e||event;if(e.keyCode!=13)return;this.command();this.value='';");
        this.appendto=function(parent)
        {
            parent.appendChild(this.container);
        }
        container=null;
    }

    //var db=new DrawingBoard(100,100)
    //db.drawLine([5,5],[36,44],"red")
    //document.body.appendChild(db.container);
    var c=new Console("100%","100%");
    c.appendto(document.body);

</script>

JavaScript技術一個用js實現控制臺控件的代碼,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 永登县| 紫阳县| 安乡县| 栖霞市| 通州区| 自贡市| 白城市| 沾化县| 桦南县| 珲春市| 赤峰市| 铁岭县| 绵阳市| 正安县| 台东市| 大石桥市| 抚远县| 新野县| 长治市| 涟水县| 阿拉善盟| 昂仁县| 民勤县| 承德县| 扶沟县| 崇左市| 石景山区| 北辰区| 通渭县| 弋阳县| 晋州市| 巴青县| 岑溪市| 远安县| 西安市| 怀仁县| 嘉兴市| 木兰县| 浙江省| 天长市| 大同市|