posted 16 years ago
I'd like to check if a given tag ID exists or not. I tried
typeof document.getElementById(givenID).innerHTML != "string"
or
document.getElementById(givenID).innerHTML != null
but both of them fail. Does someone know how to check if the given tag id is valid?
thanks.
SCJA, SCJP5.0, SCBCD, SCWCD