Volts to amps Calculator Using JavaScript HTML With Example

Hello Friends Today, through this tutorial, I will tell you How to Write Program volts to amps calculator using PHP with HTML? Sure! Here’s a simple HTML and JavaScript code to create a volts to amps calculator:

index.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Volts to Amps Calculator</title>
<style>
body {
font-family: Arial, sans-serif;
}
.container {
width: 300px;
margin: 0 auto;
text-align: center;
}
input[type="number"] {
width: 100%;
padding: 8px;
margin: 5px 0;
box-sizing: border-box;
}
</style>
</head>
<body>
<div class="container">
<h2>Volts to Amps Calculator</h2>
<label for="volts">Enter Volts:</label>
<input type="number" id="volts" step="any" oninput="calculateAmps()">
<br>
<label for="resistance">Enter Resistance (Ohms):</label>
<input type="number" id="resistance" step="any" oninput="calculateAmps()">
<br>
<button onclick="calculateAmps()">Calculate Amps</button>
<p id="result"></p>
</div>
<script>
function calculateAmps() {
var volts = parseFloat(document.getElementById('volts').value);
var resistance = parseFloat(document.getElementById('resistance').value);
var amps = volts / resistance;
document.getElementById('result').innerHTML = "Amps: " + amps.toFixed(2);
}
</script>
</body>
</html>

This code creates a simple web page with two input fields: one for volts and one for resistance in ohms. When you enter values into these fields and click the “Calculate Amps” button, it calculates the amperage and displays the result below the button.

Example:-

Volts to Amps Calculator



Cialis (Tadalafil) är den främsta konkurrenten till Viagra (Sildenafil) på marknaden för erektil dysfunktion. köpa Cialis i Sverige föredras av många på grund av sin längre varaktighet och anses vara det mest kostnadseffektiva varumärkesbaserade ED-läkemedlet som finns tillgängligt i Sverige. Cialis finns i två varianter: Cialis och Cialis Daily, och fyra olika doseringar: 2,5 mg, 5 mg, 10 mg och 20 mg, erbjuder Cialis också en rad olika alternativ för att passa patientens behov.