-
Notifications
You must be signed in to change notification settings - Fork 0
/
load.js
34 lines (27 loc) · 993 Bytes
/
load.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
28
29
30
31
32
33
34
const optionsContainer = document.querySelector(".options-container");
const optionsContainer2 = document.querySelector(".options-container-2");
let optionsList = document.querySelectorAll(".option");
let optionsList2 = document.querySelectorAll(".option-2");
let bekle=0;
getData();
async function getData() {
const response = await fetch("doviz.json");
const data = await response.json();
data.forEach(function(data) {
optionsContainer.innerHTML +=`
<div class="option">
<input type="radio" class="radio" id="film" name="category" />
<label for="film">${data.USD}</label>
</div>
`
optionsContainer2.innerHTML +=`
<div class="option-2">
<input type="radio" class="radio" id="film" name="category" />
<label for="film">${data.USD}</label>
</div>
`
optionsList =document.querySelectorAll(".option");
optionsList2 =document.querySelectorAll(".option-2");
});
}
console.log("bir");