name="files[]"
* {
outline: 1px solid red;
outline-offset: -1px;
}
<div id="hide_forever">
Div, который прячется навсегда
</div>
<button id="button1">Скрыть DIV</button>
<script>
const div = document.getElementById('hide_forever');
const button = document.getElementById('button1');
const status = localStorage.getItem('div_hidden');
if (status) {
div.style.display = 'none';
}
button.addEventListener('click', () => {
localStorage.setItem('div_hidden', '1');
div.style.display = 'none';
});
</script>