Dia 32
This commit is contained in:
29
Practicas/Practicas JS/DOM 03/js/main.js
Normal file
29
Practicas/Practicas JS/DOM 03/js/main.js
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
|
||||
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>`)
|
||||
}
|
||||
Reference in New Issue
Block a user