添加web
This commit is contained in:
25
web/hello.html
Normal file
25
web/hello.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!-- index.html -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Hello</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello world</h1>
|
||||
<button id="but_id" onClick="buttonClick()">Click me</button>
|
||||
<input id="select_dir_id" disabled="disabled" style="width: 400px" placeholder="显示选择的目录">
|
||||
<script>
|
||||
window.addEventListener('pywebviewready', function() {
|
||||
console.log('pywebview is ready');
|
||||
})
|
||||
function buttonClick(){
|
||||
console.log('dddddd');
|
||||
pywebview.api.button_click().then((response)=>{
|
||||
document.getElementById('select_dir_id').value=response
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user