Call function inside a function : Function Call « Function « JavaScript Tutorial






<HTML>

<HEAD>

<SCRIPT language="JavaScript">
<!--
function get_added_text(textpart1,textpart2)
{
 var added_text=textpart1+" "+textpart2;
 return added_text;
}

function write_text()
{
 var thetext=get_added_text("Hi","there!");
 document.write(thetext);
}

//-->
</SCRIPT>

</HEAD>

<BODY>
<SCRIPT language="JavaScript">
<!--
write_text();
//-->
</SCRIPT>

</BODY>

</HTML>








7.5.Function Call
7.5.1.Call your function
7.5.2.Call function inside a function
7.5.3.Call a function in hyperlink
7.5.4.Call your function in body onLoad event
7.5.5.Nested function call
7.5.6.Function call sequence