【发布时间】:2021-01-17 01:56:59
【问题描述】:
希望你们都做得很好。您能否详细说明为什么会这样。我有一个 ID 为“登录”的按钮。我想当我按下按钮时我想从数据库中获取数据,但我得到一个错误“文档未定义”。我是 js 新手。渴望收到您的来信。
var connection = mysql.createConnection({
host : 'localhost',
user : 'abc',
password : abc,
database : 'abc'
});
connection.connect();
document.getElementById('signin').addEventListener('click', async () => {
Console.log("Hello! ")
})
function newApp() {
const win = new BrowserWindow({ width: 700, height: 400 })
win.loadURL(
url.format({
pathname: "index.html",
slashes: true
})
);
}
【问题讨论】:
-
这能回答你的问题吗? `document` is not defined Electron
标签: javascript electron