🌦️ Free Online Weather Checker
https://omg10.com/4/10644249
async function getWeather() { const city = document.getElementById('cityInput').value; if (!city) { alert('Please enter a city name'); return; }
const url = `https://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${apiKey}&units=metric`;
try { const res = await fetch(url); const data = await res.json();
if (data.cod === 200) { document.getElementById('result').innerHTML = `
Temperature: ${data.main.temp} °C
Weather: ${data.weather[0].description}
Humidity: ${data.main.humidity}%
Wind: ${data.wind.speed} km/h
`; } else { document.getElementById('result').innerHTML = `
City not found
`; } } catch (error) { document.getElementById('result').innerHTML = `
Error fetching data
`; } }
Hi, I'm M. SAIF, the founder and author behind dailysearch.blog—your trusted source for trending insights, business guides, AI innovations, and more. With a passion for digital growth and real-world impact, I’ve built DailySearch to empower entrepreneurs, learners, and readers across the globe. Every article I publish is carefully researched, SEO-optimized, and designed to deliver real value. 👉 You can trust me to bring you facts, clarity, and the latest trends—all in one place. Let’s grow and explore the future, together.
0 Comments