国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > JS > 正文

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

2024-09-06 12:41:29
字體:
來源:轉載
供稿:網友
代碼如下:
<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;

        }
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 葫芦岛市| 错那县| 绥德县| 三都| 许昌县| 惠安县| 崇礼县| 广河县| 封丘县| 谢通门县| 芜湖市| 西乌珠穆沁旗| 道真| 南江县| 澄城县| 南川市| 石阡县| 商丘市| 十堰市| 股票| 托里县| 家居| 兴文县| 讷河市| 溆浦县| 英超| 平陆县| 肃宁县| 平顶山市| 阿克陶县| 庆安县| 大足县| 邹平县| 浪卡子县| 汤阴县| 客服| 红原县| 博湖县| 菏泽市| 万载县| 桃园县|