<input type="number" min="10" max="20" placeholder="10">
<input type="number" min="5" max="10" placeholder="5">
<input type="number" min="7" max="15" placeholder="7">
<div class="block">Hello, world!</div>
let hideBlock = true
document.querySelectorAll('input')
.forEach(input => {
// console.log(input.min, input.max, input.value)
if (input.value && +input.value > +input.min)
hideBlock = false
})
if (hideBlock) {
document.querySelector('.block').style.display = 'none'
} else {
document.querySelector('.block').style.display = 'block'
}
const block = document.querySelector('.block');
const inputSelector = 'input[type="number"]';
const toggleBlock = () =>
block.style.display = Array
.from(document.querySelectorAll(inputSelector))
.some(n => n.value && +n.value > +n.min)
? 'block'
: 'none';
document.addEventListener('input', e => e.target.matches(inputSelector) && toggleBlock());
toggleBlock();
// или
const inputs = document.querySelectorAll(inputSelector);
const toggleBlock = () =>
block.hidden = Array.prototype.every.call(
inputs,
n => !n.value || +n.value <= +n.min
);
inputs.forEach(n => n.addEventListener('input', toggleBlock));
toggleBlock();