runder Wert auf 2 Dezimalstellen Javascript
Ich habe ein kleines Problem mit dem Endwert, ich muss auf 2 Dezimalstellen runden.
var pri='#price'+$(this).attr('id').substr(len-2);
$.get("sale/price?output=json", { code: v },
function(data){
$(pri).val(Math.round((data / 1.19),2));
});
});
Jede Hilfe wird geschätzt.
Lösung:$(pri).val(Math.round((data / 1.19 * 100 )) / 100);