编辑下面的代码:【加编码】
<html> <head> <script> function myFunction() { alert("Hello World!"); } </script> </head> <body> <button onclick="myFunction()">Try it</button> <p>By clicking the button above, a function will be called. The function will alert a message.</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂