⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addandremove.js

📁 javascript 很酷的类库
💻 JS
字号:
isc.SectionStack.create({    ID: "sectionStack",    visibilityMode: "multiple",    width: 300,    height: 500,    sections: [        {title: "Blue Pawn", expanded: true, items: [            isc.Img.create({autoDraw: false, width: 48, height: 48, src: "pieces/48/pawn_blue.png"})        ]},        {title: "Green Cube", expanded: true, canCollapse: false, items: [            isc.Img.create({autoDraw: false, width: 48, height: 48, src: "pieces/48/cube_green.png"})        ]},        {title: "Blue Cube", expanded: false, items: [            isc.Img.create({autoDraw: false, width: 48, height: 48, src: "pieces/48/cube_blue.png"})        ]}    ]});isc.IButton.create({    left: 325,    width: 150,    title: "Add Section",    click: function () {        // alternate adding yellow piece and blue cube        if (sectionStack.sections.length % 2 == 1) {            sectionStack.addSection({                title: "Yellow Piece",                 expanded: true, items: [                    isc.Img.create({autoDraw: false, width: 48, height: 48,                                     src: "pieces/48/piece_yellow.png"})                ]            });        } else {            sectionStack.addSection({                title: "Blue Cube", expanded: false, items: [                    isc.Img.create({autoDraw: false, width: 48, height: 48,                                     src: "pieces/48/cube_blue.png"})                ]            });        }    }});isc.IButton.create({    left: 325,    top: 30,    width: 150,    title: "Remove Section",    click: function () {        // remove last section        sectionStack.removeSection(sectionStack.sections.length-1);    }});

⌨️ 快捷键说明

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