April 21, 2009

0 A Function with arguments, that return a value

<html>
<head>
<script type="text/javascript">
function product(a,b)
{
return a*b
}
</script>
</head>
<body>
<script type="text/javascript">
document.write(product(4, 3))
</script>
<p> The script in the body section calls a function with two parameters (4 and 3) </p>
<p> The function will return the product of these two parameters </p>
</body>
</html>

0 comments:

Post a Comment

Blogger Themes

 
Powered by Blogger