编辑下面的代码:
【加编码】
查看效果 »
<html> <head> <script> function msg() { alert("Hello world!"); } </script> </head><body> <form> <input type="button" value="Click me" onclick="msg()"> </form> <p>按钮点击时会触发javascript代码。</p> </body> </html>
结果:
【此窗口】
帮助?