I have code :
function compute() { if ($(\'input[name=type]:checked\').val() != undefined) { var a = $(\'input[name=service_price]\').val();
use parseInt
var total = parseInt(a) + parseInt(b); $('#total_price').val(total);