29 lines
1004 B
JavaScript
29 lines
1004 B
JavaScript
|
|
|
|
function eurToDolar(){
|
|
let eurosInput = document.getElementById('eurosInput');
|
|
let dolarOutput = document.getElementById('dolarOutput');
|
|
resultado = parseFloat(eurosInput.value)*1.09;
|
|
dolarOutput.value=resultado.toFixed(2);
|
|
}
|
|
|
|
function dolarToEur(){
|
|
let dolarInput = document.getElementById('dolarInput');
|
|
let eurOutput = document.getElementById('eurOutput');
|
|
resultado = parseFloat(dolarInput.value)*0.9;
|
|
eurOutput.value=resultado.toFixed(2);
|
|
}
|
|
|
|
function pvpIVA(){
|
|
let pvpInput=document.getElementById('pvpInput');
|
|
alert(pvpInput.value*1.21)
|
|
}
|
|
|
|
function frase() {
|
|
let nombre = document.getElementById('nombre').value;
|
|
let apellidos = document.getElementById('apellidos').value;
|
|
let nacimiento = document.getElementById('nacimiento').value;
|
|
let ciudad = document.getElementById('ciudad').value;
|
|
let frase =document.getElementById('frase');
|
|
frase.innerHTML= (`Hola ${nombre} ${apellidos} nacido el año ${nacimiento} en ${ciudad} <br>`)
|
|
} |