const link = document.querySelector('.link');
link.addEventListener('click', e => {
e.preventDefault();
const inputs = document.querySelectorAll('.data');
inputs.forEach(input => {
if (input.value == '') {
input.style.border = '2px solid red';
} else {
input.style.border = '2px solid green';
}
})
})