mirror of
https://github.com/sergeyyarkov/openweather-api.git
synced 2026-10-11 10:28:52 +03:00
Update app.js
This commit is contained in:
parent
01f8197b22
commit
b4bb1940d3
@ -3,7 +3,7 @@ function weatherInfo() {
|
|||||||
document.querySelector('#search-btn').onclick = () => {
|
document.querySelector('#search-btn').onclick = () => {
|
||||||
// запрос
|
// запрос
|
||||||
const searchValue = document.querySelector('#search-area').value;
|
const searchValue = document.querySelector('#search-area').value;
|
||||||
const request = `http://api.openweathermap.org/data/2.5/weather?q=${searchValue}&appid=32dda4a23cf5093afca2f2f086c16833`;
|
const request = `https://api.openweathermap.org/data/2.5/weather?q=${searchValue}&appid=32dda4a23cf5093afca2f2f086c16833`;
|
||||||
|
|
||||||
if (searchValue.trim() != '') {
|
if (searchValue.trim() != '') {
|
||||||
// обработчик
|
// обработчик
|
||||||
@ -65,4 +65,4 @@ function weatherInfo() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
weatherInfo();
|
weatherInfo();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user