首页
极刻
圈子
教程
开源
登录 / 注册
返回教程:Javascript 教程
TRY RUN / 在线示例
Javascript 教程 函数
Javascript 教程 函数
源代码
运行
<!DOCTYPE html> <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>
运行结果