What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

How to Put IDs on Elements collected with getElementsByClass

carla_rogers

New member
Two questions about how to work with the elements returned by getElementsByClass

QUESTION 1:
How can an id be added to all the elements that have been collected by the getElementsByClass . Basically, I want to cycle through the array returned from getElementsByClass('myclass'). IF an id already is on the element, would like to skip those.

QUESTION 2.
What data is included regarding all the elements collected by getElementsByClass.

I appreciate your help in learning this very important information. THANk you
 
Back
Top