源代码:
<!DOCTYPE html> <html> <head> <script> function myFunction() { alert("Hello! I am an alert box!"); } </script> </head> <body> <input type="button" onclick="myFunction()" value="Show alert box" /> </body> </html>
测试结果:
wowef.com
- 在线测试