Karthik_Mahalingam
попробуйте это решение, основанное на вашем предыдущем вопросе
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>C S</title>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
var counter = 0;
$(document).ready(function () {
$('#btnGetValue').click(function () {
var selValue = $('input[name=rbnNumber]:checked').val();
counter += parseInt( selValue);
$('p').html('<br/>Counter: ' + counter + '');
});
});
</script>
</head>
<body>
<input type="radio" name="rbnNumber" value="1" /> Number 1<br />
<input type="radio" name="rbnNumber" value="2" /> Number 2 <br />
<input type="radio" name="rbnNumber" value="3" /> Number 3 <br />
<input type="radio" name="rbnNumber" value="4" /> Number 4 <br />
<input type="radio" name="rbnNumber" value="5" /> Number 5
<br /><br />
<input type="button" id="btnGetValue" value="Increament Counter" />
<p style="font-size:25px;">0</p>
</body>
</html>