Document getElementById check if not null
Document getElementById check if not null
Check if element is not null.
var element = document.getElementById('something');
if (element != null && element.value == '') {
}
Check if element is not null.
var element = document.getElementById('something');
if (element != null && element.value == '') {
}
Leave a comment