title: how to pass checkbox value to javascript function
body: <p>my code is : </p>
  
  <pre><code>&lt;input type="checkbox" name="area" id="area" value="0"&gt;Some Text1&lt;/input&gt;
  &lt;input type="checkbox" name="area" id="area" value="80"&gt;Some Text2&lt;/input&gt;
  </code></pre>
  
  <p>and javascript code is</p>
  
  <p></p>
  
  <pre><code>function calc(){var textValue1 = document.getElementById('quantity').value;
  var textValue2 = document.getElementById('area').value;
  document.getElementById('cost').value = textValue1 * textValue2 ; }
  </code></pre>
  
  <p></p>
  
  <p>but it isn't working.</p>