function函数的运用
function,后跟一组参数,以及函数体。
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script language="Javascript" type="text/javascript" > function sayHi(name,message){ document.write("Hello"+","+name+","+message); } sayHi("ROY","Have a nice day!"); </script> </head> <body> </body> </html>