example05.html 226 B

123456789101112131415
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title></title>
  6. </head>
  7. <body>
  8. <button onclick="foo()">确定</button>
  9. <script>
  10. function foo() {
  11. alert('Hello, world!');
  12. }
  13. </script>
  14. </body>
  15. </html>