操作方法
第一步 定义函数,这就好比你给你孩子起了名字 function +自己命名+()+{+你的输出+}; function good(){ alert("hello,world"); }; function就好比你孩子身上的胎记怎么擦不掉 自己命名好比纹身你可以用药水洗掉,例如li lisan lisi等 ()也好比胎记 {}同上
第二 调用函数,就好比是叫到谁就叫谁上台演讲,例如”周xx,上台自我介绍“ 自己命名+(); good();
第三 嵌入html的头部 <head> <script type="text/javascript"> function good(){ alert("hello,world"); }; good(); </script> </head>