Changes

Jump to: navigation, search

Understanding JavaScript Functions

406 bytes added, 18:28, 24 April 2007
Returning a Value from a Function
Next we need to look at how a function might return a value.
 
<pre>
 
<html>
<head>
<title>A Simple JavaScript Function Example</title>
<script language="JavaScript" type="text/javascript">
 
function sayHello()
{
alert("Hello!");
}
</script>
</head>
<body>
 
<h1>Calling a function</h1>
 
<script language="JavaScript" type="text/javascript">
sayHello( "24th", "July" );
sayHello ( "1st", "August" );
sayHello ( "24th", "May" );
</script>
 
</body>
</html>
 
</pre>
<h1>Calling a function</h1>

Navigation menu