-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
29 lines (21 loc) · 975 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//Mobile version of the JS
const inputValue = document.getElementById('myInputs');
inputValue.addEventListener('input', function(event) {
let myConverted = event.target.value;
let myDollarValue = document.getElementById('dollarsId');
myDollarValue.innerHTML = myConverted * 387.5;
let poundsValue = document.getElementById('poundsId');
poundsValue.innerHTML = myConverted * 498.7;
let eurosValue = document.getElementById('eurosId');
eurosValue.innerHTML = myConverted * 440.8;
})
const inserted = document.getElementById('myInput');
inserted.addEventListener('input', function(event) {
let converted = event.target.value;
let dollarValue = document.getElementById('dollarId');
dollarValue.innerHTML = converted * 387.5;
let poundValue = document.getElementById('poundId');
poundValue.innerHTML = converted * 493.7;
let euroValue = document.getElementById('euroId');
euroValue.innerHTML = converted * 440.8;
})