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>
原文地址:https://www.cnblogs.com/roytanlu/p/3074424.html