DELAWARE'S · MIDDLETOWN · ODESSA · TOWNSEND AREA
Area for l = 6 and w = 3 where the function is written in the head section as follows:
<head> <TITLE>Javascript Function CalcArea in Head</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <!-- This is Basic HTML with some Javascript thrown in --> <META content="MSHTML 6.00.6000.16735" name=GENERATOR> <script type="text/javascript"> function CalcArea(x,y) { var area; var area = x*y; return area; } </script> </head>
But called in the Body Section
Calculations provided by script below.
CalcArea(6,3)the result
document.write(CalcArea(6,3)) document.write("<br /> "<br />"); document.write("Now calculate for l=60 and w=30"); document.write("<br />"); document.write(CalcArea(60,30)); document.write("<br />"); document.write("<p>" + "Hello World You Did It!" + "</p>"); |
Return to Table of Contents
DELAWARE'S MIDDLETOWN ODESSA AND TOWNSEND AREA