Closed ylm-king closed 3 years ago
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <h1 id="hello" t="zs">您好, 我的世界!</h1> </body> <script type="text/tiscript"> $(#hello).on('click', () => { stdout.println("'点击事件调用成功。'") $(#hello).text = view.get_newName(); } ) </script> <script> document.querySelector('#id').text = '世界在转!' </script> </html>
Please confirm the problem
h1 is not a button. Replace it with <button> or <widget type=button /> or add h1#hello { behavior: clickable; } to your CSS.
h1
<button>
<widget type=button />
h1#hello { behavior: clickable; }
In this code, the code in script is not executed.
Please confirm the problem