You are using
'parseInt',which will take only integer part. So try to use
'parseFloat' method. Please check the modified code.
function getSum() {
totalvalue = 0
obj = document.myform.chkbox
for (i = 0; i < obj.length; i++) {
if (obj[i].checked) {
totalvalue += parseFloat(obj[i].value);
}
}
if (totalvalue == 0) {
alert("Please select atleast one product!!");
document.myform.totalsum.value = ""
}
else {
document.myform.totalsum.value = totalvalue;
}
}