Nie wiem jak wyświetlić swój tekst zamiast "NaN" jeśli w input jest 0 lub pusty tekst. Dzięki.
<script> function oblicz(){ var sum = document.getElementById('sum').value; return sum.toFixed(2); } </script> <span id="sum"></span> <input type="button" class="button" value="Przelicz" onclick="document.getElementById('oblicz')" />