16 lines
471 B
JavaScript
16 lines
471 B
JavaScript
const click_me = document.getElementById('click_me')
|
|
const btn_create = document.getElementById('create')
|
|
const btn_read = document.getElementById('read')
|
|
const content = document.getElementById('content')
|
|
click_me.onclick = () => {
|
|
alert("按钮被点击!\nnode version:"+env_info.nodev)
|
|
}
|
|
btn_create.onclick = () => {
|
|
myAPI.saveFile(content.value)
|
|
}
|
|
btn_read.onclick = async () => {
|
|
let data = await myAPI.readFile()
|
|
alert(data)
|
|
}
|
|
console.log(window)
|