W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <head> <script> function myFunction() { document.getElementById("demo").innerHTML = "Hello World"; } </script> </head> <body> <p ondblclick="myFunction()">双击此段以触发函数。</p> <p id="demo"></p> </body> </html>