title: How can i make my javascript code add the total amount
body: <p>Hi so i have been working on this code that allows the user to select different radio button options and then gives them the total cost after they select them.</p>
  
  <p>This is what i have tried: (html) </p>
  
  <pre><code> Total &lt;input type="text" id="count" value="$0" readonly /&gt;       
  
  
  &lt;form action="MAILTO:someone@example.com" method="post" enctype="text/plain"&gt;
  &lt;h4&gt;Contact plugin&lt;/h4&gt;
  &lt;input type="radio" name="pak1" class="mnozstvi_sleva" value="4&amp;#x00A;Qty" onClick="changeText(0)"&gt;No
  
  &lt;input type="radio"  class="mnozstvi_sleva" onclick="changeText(5)" value="2&amp;#x00A;Qty" name="PAk1" &gt;Yes!
  
  &lt;h4&gt; Mailing list&lt;/h4&gt; &lt;input type="radio"  class="mnozstvi_sleva" onclick="changeText2(0)" value="2&amp;#x00A;Qty" name="PAk21" &gt;No
  
    &lt;input type="radio"  class="mnozstvi_sleva" onclick="changeText2(10)" value="2&amp;#x00A;Qty" name="PAk21" &gt;Yes
          `
  </code></pre>
  
  <p>(javascript)</p>
  
  <pre><code>function changeText(value) {
   document.getElementById('count').value = 10 * value;   
  }
  
  function changeText2(value) {
   document.getElementById('count').value = 10 * value;   
  }
  </code></pre>
  
  <p>So i need this to add together instead of change to one number you can run the code here on jsfiddle: <a href="https://jsfiddle.net/J7m7m/573/" rel="nofollow">jsfiddle</a></p>