Get Weather
<script>
async function getWeather() {
const city = document.getElementById('city').value;
const apiKey = 'YOUR_API_KEY'; // Replace with your API key from a weather service provider
const apiUrl = `https://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${apiKey}&units=metric`;
try {
const response = await fetch(apiUrl);
const data = await response.json();
const weatherInfo = document.getElementById('weather-info');
weatherInfo.innerHTML = `