Update biz_v.html
Browse files- biz_v.html +0 -5
biz_v.html
CHANGED
|
@@ -62,7 +62,6 @@
|
|
| 62 |
.then(data => {
|
| 63 |
console.log('JSON Response:', data);
|
| 64 |
document.getElementById('responseArea').value = JSON.stringify(data, null, 2);
|
| 65 |
-
|
| 66 |
// Создание выпадающего списка
|
| 67 |
createDropdown(data);
|
| 68 |
})
|
|
@@ -71,21 +70,17 @@
|
|
| 71 |
document.getElementById('responseArea').value = 'Error: ' + error.message;
|
| 72 |
});
|
| 73 |
});
|
| 74 |
-
|
| 75 |
function createDropdown(data) {
|
| 76 |
const container = document.getElementById('dropdown-container');
|
| 77 |
const select = document.createElement('select');
|
| 78 |
select.id = 'dropdown';
|
| 79 |
-
|
| 80 |
data.forEach(item => {
|
| 81 |
const option = document.createElement('option');
|
| 82 |
option.value = item;
|
| 83 |
option.text = item;
|
| 84 |
select.appendChild(option);
|
| 85 |
});
|
| 86 |
-
|
| 87 |
container.appendChild(select);
|
| 88 |
-
|
| 89 |
// Добавление обработчика для кнопки отправки GET-запроса
|
| 90 |
document.getElementById('sendGetRequestButton').addEventListener('click', function() {
|
| 91 |
const selectedValue = document.getElementById('dropdown').value;
|
|
|
|
| 62 |
.then(data => {
|
| 63 |
console.log('JSON Response:', data);
|
| 64 |
document.getElementById('responseArea').value = JSON.stringify(data, null, 2);
|
|
|
|
| 65 |
// Создание выпадающего списка
|
| 66 |
createDropdown(data);
|
| 67 |
})
|
|
|
|
| 70 |
document.getElementById('responseArea').value = 'Error: ' + error.message;
|
| 71 |
});
|
| 72 |
});
|
|
|
|
| 73 |
function createDropdown(data) {
|
| 74 |
const container = document.getElementById('dropdown-container');
|
| 75 |
const select = document.createElement('select');
|
| 76 |
select.id = 'dropdown';
|
|
|
|
| 77 |
data.forEach(item => {
|
| 78 |
const option = document.createElement('option');
|
| 79 |
option.value = item;
|
| 80 |
option.text = item;
|
| 81 |
select.appendChild(option);
|
| 82 |
});
|
|
|
|
| 83 |
container.appendChild(select);
|
|
|
|
| 84 |
// Добавление обработчика для кнопки отправки GET-запроса
|
| 85 |
document.getElementById('sendGetRequestButton').addEventListener('click', function() {
|
| 86 |
const selectedValue = document.getElementById('dropdown').value;
|