const tariff = document.querySelectorAll('[name="license"]');
const license = document.querySelector('#quantity');
let currentTariff = null;
let currentLicense = null;
function calc() {
if(!currentTariff || !currentLicense) return;
// тут код для вывода результата
}
tariff.forEach(el => {
el.addEventListener('change', (e) => {
currentTariff = e.currentTarget.value;
calc();
})
});
license.addEventListener('change', (e) => {
currentLicense = e.currentTarget.value;
calc();
}) <div id="fig" class="fig">
<div class="fig__row">
<div id ="body_kvadrat" class="fig__item"></div>
<div id ="body_kvadrat2" class="fig__item"></div>
</div>
<div class="fig__row">
<div id ="body_kvadrat1" class="fig__item"></div>
<div id ="body_kvadrat3" class="fig__item"></div>
</div>
</div>#body_figure{
border: 1px solid green;
}
.fig__row {
display: flex;
align-items: flex-start;
}
.fig__item {
border: 1px solid #128;
max-width: 3000px;
max-height: 1500px;
flex-shrink: 0;
} display: flex;justify-content: center;text-align: center, а ссылке display: inline-block