ajaxst,
<!DOCTYPE html>
<html>
<head>
<script>
document.addEventListener("DOMContentLoaded", function() {
function format(str) {
return str.toString().replace(/(\d+)(\.\d+)?/g, function(c, b, a) {
return b.replace(/(\d)(?=(\d{3})+$)/g, "$1 ") + (a ? a : "")
})
}
var rub = document.getElementById("r-rub").innerText;
var bankEUR = document.getElementById("bank-eur").innerText;
var num = (rub * bankEUR).toFixed(2);
num = format(num);
document.getElementById("eur").innerHTML = num
});
</script>
</head>
<body>
<span id="r-rub">100</span><br>
<span id="bank-eur">100</span><br>
<span id="eur"></span >
</body>
</html>