controls.js

来自「javascript 很酷的类库」· JavaScript 代码 · 共 36 行

JS
36
字号
isc.DynamicForm.create({
    ID: "systemSelector",
    width:75, numCols:1,
    layoutAlign:"center",
    fields: [
        {name: "selectFont", type: "select", width:120, showTitle: false,
         valueMap: ["Development", "Staging", "Production"],
         defaultValue:"Development",
         change : "statusReport.setNewStatus(value)"
        }
    ]
});

isc.Window.create({
    width: 300, height: 200,
    title: "Status",
    canDragReposition: true, canDragResize: true,
    headerControls : ["closeButton", "minimizeButton", "headerLabel", 
                      systemSelector],
                      
    items: [
        isc.Canvas.create({
            ID:"statusReport",
            padding:5,
            width: "100%",
            height: "100%",
            setNewStatus : function (system) {
                this.setContents(system +
                    ": <span style='color:green;font-weight:bold'>Normal</span><br>"); 
            }
        })
    ]
});

statusReport.setNewStatus("Development");

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?