Show sum of values for all checkboxes that are checked : <p>I’m creating an HTML form and want to achieve the following with JS, please provide the code i should use to do so.</p>

<p>1.Add values of all the checked checkboxes and show them as total.</p>

<p>2.Add a restriction the user must select at least 2 checkboxes.
Here is my code.</p>

<pre><code>&lt;input class="iput" type="checkbox" name="E33" value="4500" /&gt;
&lt;input class="iput" type="checkbox" name="E34" value="3000" /&gt;
&lt;input class="iput" type="checkbox" name="E36" value="6000" /&gt;

&lt;p&gt;Your Total is = &lt;/p&gt;
</code></pre>

<p>Also code should be such that if i add or remove checkboxes i should not have to modify the JS code too. </p>
