BorisJe,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script>
document.addEventListener('DOMContentLoaded', function() {
let sum = 0;
const field = document.querySelectorAll('[name="field"]');
document.querySelectorAll('.increase, .decrease').forEach(button => {
button.addEventListener('click', function() {
if(button.classList.contains('decrease')) sum = 0;
else sum += +button.textContent;
field.forEach(input => input.value = sum)
})
})
});
</script>
</head>
<body>
<div>
<button class="decrease" type="button">Обноления поля</button>
<input type="text" name="field" value="0" />
<button class="increase" type="button">1</button>
<button class="increase" type="button">2</button>
<button class="increase" type="button">5</button>
<button class="increase" type="button">10</button>
</div>
<div>
тут уже не работает
<input type="text" name="field" value="0" /> тут уже не работает
</div>
</body>
</html>