代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
</head>
<body style="background: white;">
<div>
<input type="file" name="" id="file">
</div>
<div>
<input type="text" value="D:\hqk\projects\study-electron\nodepad\a.db" id="input1">
<button id="btn1">btn1</button>
<button id="get_note">get_note</button>
<button id="set_note">set_note</button>
</div>
<script>
onload=function(){
file.onchange=function(){
input1.value=file.files[0].path
}
btn1.addEventListener("click",function(){
//请求读取note
var filepath = input1.value
Caller.select_db(filepath,function(status,data){
console.log(status,data)
},4000)
})
get_note.addEventListener("click",function(){
Caller.get_note("test",function(status,data){
console.log(status,data)
},4000)
})
set_note.addEventListener("click",function(){
Caller.set_note_text("test","你好",function(err){
console.log(err)
},4000)
})
}
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。