JSFiddle - React, Tailwind, and code Playground
HTML
<input id="price_lvl" placeholder="LVL">
<input id="price_eur" placeholder="EUR">
JavaScript
$(function() {
$("#price_lvl").blur(function() {
lvl = parseFloat($('#price_lvl').val().replace(",", "."));
eur = 0;
if (lvl > 0) {
eur = lvl * 0.702804
}
eur = parseFloat(Math.round(eur * 100) / 100).toFixed(2)
$("#price_eur").val(eur);
});
});