<form onsubmit="return false" oninput="output.value = price.valueAsNumber + (price.valueAsNumber * vat.valueAsNumber)">
<input name="price" type="number" value="20"> +
<input name="vat" type="number" value="0.2" step="0.1" max="1"> =
<output name="output">24</output>
</form>
body {
font-family: Roboto,"Helvetica Neue",Arial,sans-serif;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
}
a {
font-size: 2rem;
text-decoration: none;
color: teal;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.