Converter

Developer
Size
1,832 Kb
Views
6,072

How do I make an converter?

What is a converter? How do you make a converter? This script and codes were developed by Nepal Bitcoin on 08 December 2022, Thursday.

Converter Previews

Converter - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Converter</title>
</head>
<body> <div> <h3>NPR/BTC converter</h3> रु. <input type="text" placeholder="66493.72" id="convert_BTC_NPR" onkeyup="convert('BTC', 'NPR', 66493.72, false)" /> = <input type="text" placeholder="1" id="convert_BTC" onkeyup="convert('BTC', 'NPR', 66493.72, true)" /> BTC <br/> <span id="x_BTC">Input रु/BTC to convert</span>
</div>
<hr/>
<hr/>
<div> <h3>NPR/LTC converter</h3> रु. <input type="text" placeholder="423.12" required pattern="number" id="convert_LTC_रु" onkeyup="convert('LTC', 'रु', 423.1259671, false)" /> = <input type="text" placeholder="1" id="convert_LTC" required pattern="number" onkeyup="convert('LTC', 'रु', 423.1259671, true)" /> LTC <br/> <span id="x_LTC">Input रु/LTC to convert</span>
</div> <script src="js/index.js"></script>
</body>
</html>

Converter - Script Codes JS Codes

var convert = function(क, ख, ग, घ) { ङ = document.getElementById("convert_" + क); च = document.getElementById("convert_" + क + "_" + ख); if (घ) { च.value = (ङ.value * ग).toFixed(ग < 1 ? 5 : 2); } else { ङ.value = (च.value * 1 / ग).toFixed(8); } document.getElementById("x_" + क).innerText = (च.value === "" || ङ.value === "") ? "Input " + ख + "/" + क + " to convert" : (isNaN(च.value || ङ.value)) ? "Input value must be numeric." : घ ? ङ.value + " " + क + " = " + (च.value) + " " + ख : (च.value) + " " + ख + " = " + ङ.value + " " + क; if (च.value === "" || ङ.value === "") { च.value = ""; ङ.value = ""; }
};
Converter - Script Codes
Converter - Script Codes
Home Page Home
Developer Nepal Bitcoin
Username nepalbitcoin
Uploaded December 08, 2022
Rating 3
Size 1,832 Kb
Views 6,072
Do you need developer help for Converter?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Nepal Bitcoin (nepalbitcoin) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!