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>

 

posted @ 2013-05-12 19:15  roytanlu  阅读(154)  评论(0编辑  收藏  举报