K
Kim
How do I find if an element is a certain element (like
HTMLTableRowElement) ?
Using "alert(typeof el)" simply displays "object" while "alert(el)"
displays "HTMLTableRowElement".
el = document.getElementById('stringValue');
I need to match this specific element because of problems with
"display: none/block" in non-IE browsers.
This doesnt work:
if (el == HTMLTableRowElement || el == 'HTMLTableRowElement') {
el.style.display = '';
} else {
el.style.display = 'block';
}
HTMLTableRowElement) ?
Using "alert(typeof el)" simply displays "object" while "alert(el)"
displays "HTMLTableRowElement".
el = document.getElementById('stringValue');
I need to match this specific element because of problems with
"display: none/block" in non-IE browsers.
This doesnt work:
if (el == HTMLTableRowElement || el == 'HTMLTableRowElement') {
el.style.display = '';
} else {
el.style.display = 'block';
}