Skip to main content

Using Functions: Activity 1 (Part 1)

Start your text editor and type the following:
 
 <html>
<head>
<title>CD Publisher</title>
</head>
<body>
<h1>CD Publisher</h1>
<form name="frmOrder">
  <table border="0" width="344">
    <tr>
      <td width="231">Number of CDs ordered:</td>
      <td width="93"><input type="text" name="txtQuantity" size="10" value="0"></td>
      <td width="1"><input type="button" value="Calculate" name="btnCalculate"></td>
    </tr>
    <tr>
      <td width="211" colspan="3">At 2.95 for each CD</td>
    </tr>
    <tr>
      <td>Order Total:</td>
      <td width="70"><input type="text" name="txtOrderTotal" size="10"></td>
      <td width="70"><input type="reset" value="Reset" name="btnReset"></td>
    </tr>
  </table>
</form>
</body>
</html>
 

Save the file as CDPublisher.htm and preview it in your browser. After previewing the page, return to your text editor

Next: Using Functions: Activity 1 (Part 2)