Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to create a currency select options on a html website

<!-- visit https://github.com/codad5/currencynet to begin -->
<select id="currency-option" onchange="changeCurrency">
                        <option name="USD" id="">USD</option>
                        <option name="NGN" id="">NGN</option>
                        <option name="EUR" id="">EUR</option>
                        <option name="INR" id="">INR</option>
                    </select>
                    <script>
                        document.getElementById('currency-option').addEventListener('change', () => {

                            const currencyChanger = new currencynet(false);
                            currencyChanger.clientCurrency = document.getElementById('currency-option').value; // this will return the value of the selected currency option  
                            currencyChanger.reWrite(true);

                        });
                    </script>
Source by codad5.github.io #
 
PREVIOUS NEXT
Tagged: #create #currency #select #options #html #website
ADD COMMENT
Topic
Name
3+4 =