Good evening
In the example below add the values of 3 text boxes, and the result comes out in the fourth, how to make this result appear with a comma and not a dot?
<html>
<head>
<script type="text/javascript">
function id( el ){
return document.getElementById( el );
}
function getMoney( el ){
var money = id( el ).value.replace(/[^0-9]/g,'');
return parseFloat( money );
}
function soma()
{
var total = getMoney('campo1')+getMoney('campo2')+getMoney('campo3');
id('campo4').value = 'R$ '+total/100;
}
</script>
</head>
<body>
<form action="" method="">
<input name="campo1" id="campo1" value="25,60" /><br />
<input name="campo2" id="campo2" value="5,15" /><br />
<input name="campo3" id="campo3" value="2,63" /><br />
<input name="campo4" readonly="readonly" id="campo4" /><br />
<input type="button" onclick="soma()" value="Soma de Valores" />
</form>
</body>
</html>