Note that there are some explanatory texts on larger screens.

plurals
  1. POPopup Alert..... can someone help me
    primarykey
    data
    text
    <p>i want to have an output like in this picture <code>http://farm8.staticflickr.com/7314/11269674244_6ddf5a65cf.jpg</code></p> <p>the question is how can i connect text"total" in button "same" and text"same1"</p> <p>1:script</p> <pre><code>function myFunction(){ var total = 0; $("input[type='checkbox'").each(function (index) { if ($(this).is(':checked')) { // This is checked checkbox ! // Add the amount to total // Value is a string. So, you need to convert it integer (Numeric) total += parseInt($(this).attr("value")); } }); // Show the final total value $("#total").val(total); } </code></pre> <p>2:html</p> <pre><code>&lt;form&gt; &lt;input name="100" type="checkbox" id="bike" value="100"&gt;&lt;label for="bike"&gt;100&lt;/label&gt;&lt;br&gt; &lt;input type="checkbox" id="bike2" value="100"&gt;&lt;label for="bike2"&gt;100&lt;/label&gt;&lt;br&gt; &lt;input type="checkbox" id="bike3" value="100"&gt;&lt;label for="bike3"&gt;100&lt;/label&gt;&lt;br&gt; &lt;input type="checkbox" id="bike4" value="100"&gt;&lt;label for="bike4"&gt;100&lt;/label&gt;&lt;br&gt; &lt;input type="checkbox" id="bike5" value="100"&gt;&lt;label for="bike5"&gt;100&lt;/label&gt;&lt;br&gt; &lt;input type="checkbox" id="bike6" value="100"&gt;&lt;label for="bike6"&gt;100&lt;/label&gt;&lt;br&gt; &lt;input type="checkbox" id="bike7" value="100"&gt;&lt;label for="bike7"&gt;100&lt;/label&gt;&lt;br&gt; &lt;input type="checkbox" id="bike8" value="100"&gt;&lt;label for="bike8"&gt;100&lt;/label&gt;&lt;br&gt; &lt;input type="checkbox" id="bike9" value="100"&gt;&lt;label for="bike9"&gt;100&lt;/label&gt;&lt;br&gt; &lt;input type="checkbox" id="bike1" value="100"&gt;&lt;label for="bike1"&gt;100&lt;/label&gt;&lt;br&gt; &lt;button type="button" onclick="myFunction()"&gt;Equal&lt;/button&gt; &lt;input onclick="myFunction()" type="text" id="total" value="0"&gt;&lt;br&gt; &lt;button type="button" onclick=""&gt;Same&lt;/button&gt; &lt;input onclick="" type="text" id="same1" value="0"&gt; &lt;/form&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload