This is a real-time weather application. Users can quickly check the current weather conditions for any location globally by entering a city name or a zip code. Reference Tutorial: Code A Weather App in Pure JavaScript
- Real-Time Data Display: Show current weather information and weather forcast for the five following days.
- Multi-Mode Search: Supports queries by city name (e.g., "London") or 5-digit zip code.
- Dynamic Backgrounds: Automatically updates full-screen background images according to API weather states.
- Local Time Display: Accurately calculates and displays the local day, date, and time of the target city based on its timezone.
- Flexbox, Grid, Classmorphism
- Fetch API, DOM Manipulation
- Get an API Key:
- Go to OpenWeatherMap and sign up for a free account.
- Generate a new key.
- Configure the App:
- Locate the
appIdconstant at the top of thescript.js:const appId = "YOUR_API_KEY_HERE";
- Replace the placeholder with your actual API key.
- Locate the
- Run the Project:
- Clone or download this repository to your local machine.
- Open the
index.htmlfile directly in your browser.
- Enjoy:
- Enter a city name (e.g.,
Beijing) or a zip code, and click the Search button.
- Enter a city name (e.g.,
