This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const keyImg = 'c9c70ab642fedb925db9bfb33b4f73f1'; | |
const b = document.getElementById('body'); | |
let btn = document.getElementById('btn-search'); | |
let input = document.getElementById('search'); | |
let section = document.getElementById('section'); | |
async function getImg(word) { | |
try { | |
const url = `https://www.flickr.com/services/rest/?method=flickr.photos.search&api_key=${keyImg}&tags=${word}&tag_mode=all&extras=url_h&format=json&nojsoncallback=1`; | |
const res = await fetch(url); |