User
Array.apply(null, document.querySelectorAll('input[type=file].my')).forEach(input => { input.addEventListener('change', e => { let label = Array.apply(null, document.querySelectorAll('label')).find(l => l.htmlFor === input.id); label.innerHTML = (input.value ? 'Выбрано файлов: ' + input.files.length : 'Выберите файлы') }); })