Using the statement:
var children = document.getElementById('id').getElementsByTagName('*');
I’d like to exclude all <BR> elements, is there a syntax for getElementsByTagName that lets me do that, or some other nice way?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t do it with a native function, but you can easily filter.
http://jsfiddle.net/idbentley/ncH95/4/
It would be easier to use jQuery or a similar library (Zepto is a good tiny lib), but if you want to use raw javascript you can use the above.