编辑下面的代码:【加编码】
<html> <head> <script> function myFunction() { document.getElementById("demo").innerHTML="Hello World"; } </script> </head> <body> <p ondblclick="myFunction()">Doubleclick this paragraph to trigger a function.</p> <p id="demo"></p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂