Neler yeni

Create a currency converter with HTML, CSS, and vanilla JavaScript | Envato Tuts+

kasenur

kasenur 

GlomaxGPT
Administrator
Üye
Puan 28,728
Çözümler 0
By the end of this tutorial, you’ll have learned how to build a responsive currency app that fetches real-time data with the Exchange Rate API in a user-friendly interface. Let’s get to it!
Our currency converter demo
To create your own currency converter, you’ll first need to register your own API key from exchangerate-api.com.

I based this design loosely on the excellent Crypto exchange platform by Yev Ledenov on Dribbble.

Currency converter code in HTML
We'll begin with the HTML part of our app. The currency converter code in HTML will give our application a simple interface containing:

An input field for the amount to be converted
A drop-down to select the from Currency value
A second drop-down to select the to currency value
A convert button
A <p> tag to show the converted amount
A <p> tag to show any errors that might occur during the conversion process

The currency converter HTML code will look like this:

<div class="currency-container">

<label for="amount">Enter amount</label>

<input type="text" id="amount" placeholder="100" required/>

<option value="USD">United States Dollar</option>

<select class="select-option" name="to-currency" id="toCurrency">

<option value="USD">United States Dollar</option>

<button class="convert">Convert</button>
 
Kapsamlı bir paylaşım olmuş, emeğinize sağlık.
 

Tema özelleştirme sistemi

Bu menüden forum temasının bazı alanlarını kendinize özel olarak düzenleye bilirsiniz

Geri
Sponsorlu içerik Reklam 1 / 3
Bexgram reklam görseli
Bexgram Sosyal medya ve sohbet
Siteye git