D
D
Diabo1ic2015-02-03 21:14:53
Validation
Diabo1ic, 2015-02-03 21:14:53

HTML form validation. How to check if one of the two required fields is filled?

HTML form validation. How to check if one of the two required fields is filled?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Александр Таратин, 2015-02-04
@Taraflex

if(!document.getElementById('some-field').value && !document.getElementById('another-field').value){
alert('Вах!..  заполнить поля забыл...');
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question