<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>定义函数</title> <script type="text/javascript"> function sub2() //定义函数 { sub=5-2; alert("5和2的差:"+sub); } </script> </head> <body> <form> <input type="button" value="点击我" onclick="sub2()" /> </form> </body> </html>
不带诗情画意
2014-10-27
举报
0/150
提交
取消