【发布时间】:2020-07-08 15:25:46
【问题描述】:
我的 index.html 中有一个按钮,我想在单击时打开第二个窗口。
我在 index.js 中添加了以下内容:
const button = document.getElementById('newtask');
button.addEventListener('click', () => {
newtaskwindow();
});
function newtaskwindow() {
const BrowserWindow = remote.BrowserWindow;
const win = new BrowserWindow({
height: 400,
width: 600
});
win.loadURL('createtasks.html');
}
【问题讨论】:
标签: javascript html css electron