Answers for "Auto Update Form"

0

Auto Update Form

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<form action="">
    <input type="number" name="amountUSD" value="1"><br/>
    <input type="number" name="amountNGN" value="">
</form>
Posted by: Guest on June-04-2021
0

Auto Update Form

function convertCurrency(value) {
    // your calculation here
    return (value * 356);
}

$('[name="amountUSD"]').on('change keyup', function() {
    value = $(this).val();
    $('[name="amountNGN"]').val(convertCurrency(value));
})
Posted by: Guest on June-04-2021

Browse Popular Code Answers by Language