You are on page 1of 10

Nombre: Rubén Mauro Silva Vargas

C.I.: 8372408 L.P.

Conversor.html
Código en HTML
!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-
ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous">

<title>Conversor</title>
<script languaje="javascript">
function Cambio() {
Bolivi = document.getElementById("Bolivianos");

CambioDolar = parseFloat(Bolivi.value * 0.1436);


pres1 =document.getElementById("Dolar");
pres1.value=CambioDolar.toFixed(0);

CambioEuro = Bolivi.value * 0.132978;


pres2 = document.getElementById("Euros");
pres2.value=CambioEuro.toFixed(2);

CambioSoles = Bolivi.value * 0.44843049;


pres3 = document.getElementById("Soles");
pres3.value=CambioSoles.toFixed(2);

CambioPesochileno = Bolivi.value * 88.074687;


pres4 = document.getElementById("PesoChileno");
pres4.value=CambioPesochileno.toFixed(2);

CambioReales = Bolivi.value * 0.437598;


pres5 = document.getElementById("Reales");
pres5.value=CambioReales.toFixed(2);

CambioYuanChina = Bolivi.value * 0.878811;


pres6 = document.getElementById("China");
pres6.value=CambioYuanChina.toFixed(2);
CambioYuanJapon = Bolivi.value * 17.09684;
pres7 = document.getElementById("Japon");
pres7.value=CambioYuanJapon.toFixed(2);
}

function Limpiar() {
Bolivi = document.getElementById("Bolivianos");
Bolivi.value = " ";
pres1.value = " ";
pres2.value = " ";
pres3.value = " ";
pres4.value = " ";
pres5.value = " ";
pres6.value = " ";
pres7.value = " ";
}

</script>
</head>
<body background="9.png">
<div align="CENTER">
<h2>CONVERSION DE MONEDAS.</h2>
</div>
<div align="center" style="background-color:powderblue;">
<table BORDER CELLPADDING=10 CELLSPACING=0>
<tr>
<td><label>Bolivianos: </label></td>
<td><input type="text" id="Bolivianos"><br></td>
<td><img src="1.png" width="40" height="40"></td>
</tr>
</table><br><br>
<table FRAME="hsides" RULES="none">
<tr >
<td></td>
<td ALIGN=CENTER><label><h4>T.C.</h4></label></td>
<td ALIGN=CENTER><label><h4>Equivalente</h4> </label></td>
<td></td>
</tr>
<tr>
<td BGCOLOR="green"><label>Dolares: </label></td>
<td BGCOLOR="YELLOW" ALIGN=CENTER><label>6.96 </label><br></td>
<td><input type="float" id="Dolar"><br></td>
<td><img src="2.png" width="40" height="40"></td>
</tr>
<tr>
<td BGCOLOR="green"><label>Euros: </label></td>
<td BGCOLOR="YELLOW" ALIGN=CENTER><label>7.52 </label><br></td>
<td><input type="text" id="Euros"><br></td>
<td><img src="3.png" width="40" height="40"></td>
</tr>
<tr>
<td BGCOLOR="green"><label>Soles: </label></td>
<td BGCOLOR="YELLOW" ALIGN=CENTER><label>2.23 </label><br></td>
<td><input type="text" id="Soles"><br></td>
<td><img src="4.png" width="40" height="40"></td>
</tr>
<tr>
<td BGCOLOR="green"><label>Peso Chileno: </label></td>
<td BGCOLOR="YELLOW" ALIGN=CENTER><label>0.011354
</label><br></td>
<td><input type="text" id="PesoChileno"><br></td>
<td><img src="5.png" width="40" height="40"></td>
</tr>
<tr>
<td BGCOLOR="green"><label>Reales Brasil: </label></td>
<td BGCOLOR="YELLOW" ALIGN=CENTER><label>2.2852 </label><br></td>
<td><input type="text" id="Reales"><br></td>
<td><img src="6.png" width="40" height="40"></td>
</tr>
<tr>
<td BGCOLOR="green"><label>Yuan China: </label></td>
<td BGCOLOR="YELLOW" ALIGN=CENTER><label>1.1379 </label><br></td>
<td><input type="text" id="China"><br></td>
<td><img src="7.png" width="40" height="40"></td>
</tr>
<tr>
<td BGCOLOR="green"><label>Yuan Japon: </label></td>
<td BGCOLOR="YELLOW" ALIGN=CENTER><label>0.05849034
</label><br></td>
<td><input type="text" id="Japon"><br></td>
<td><img src="8.png" width="40" height="40"></td>
</tr>
</table><br>

<input type="button" class="btn btn-info" value ="CONVERTIR" onclick="Cambio()">


<input type="button" class="btn btn-danger" value ="INICIALIZAR" onclick="Limpiar()">
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-
q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-
UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>

</body>
</html>

You might also like