Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function MyChange() {
var myString = "4,2525";
var myString1 = "2";
var myNum = +parseFloat(myString.replace(",",".")).toFixed(2) + +parseFloat(myString1); // convert to dobule
//var n = myNum.toFixed(2); // round to decimals
alert (myNum);
}
</script>
</head>
<body>
<button onclick="MyChange()">convert</button>
</body>
</html>
The most helpful JAVASCRIPT solutions
How can I get the last day and the next day in javascript ?JAVASCRIPT Click to see more ... 5.8K 507