JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<table border='1'>
<tr>
<th>REGISTER NO</th>
<th>NAME</th>
<th>DEPARTMENT</th>
<th>jul 10,2018</th>
<th>jul 10,2018</th>
<th>MARK</th>
</tr>
<input type="checkbox" name="ch1" value="0" id="qr1" />A <br />
<input type="checkbox" name="ch1" value="5" id="qr1" />P <br />
Total:<span id="usertotal"> </span>
</div>
JavaScript
$("select").change(function() {
$('input[name="ch1"]').change();
});
$('input[name="ch1"]').change(function() {
var singleValues = 0;
$('input[name="ch1"]:checked').each(function() {
singleValues = +this.value + singleValues;
});
$("#usertotal").text(singleValues);
});