Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input type="submit" name=""onclick='Test()' id="">
- <div id="listDate">
- </div>
- <script>
- const Test = async()=> {
- console.log('hello');
- let request = new XMLHttpRequest();
- const res = await fetch('https://calendrier.api.gouv.fr/jours-feries/metropole.json');
- testJson = await res.json();
- console.log(testJson);
- let contenuTest = document.getElementById("listDate");
- let contenu;
- for( var json in testJson){
- var testKey = testJson[json];
- // console.log(testKey);
- // console.log(json);
- contenu += testKey;
- contenu += '<br>';
- contenu += json;
- contenu += '<br>';
- console.log(json);
- }
- contenuTest.innerHTML = contenu;
- // });
- }
Add Comment
Please, Sign In to add comment