Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDevjyoti Ghosh
2,422 Pointsdocument.getId() is it explained in detail later?
Hi is the dom stuff explained later in the Fullstack Javascript course because I didn't understand it properly right now?
If not the basics is that we are using the id of the div element in html to put our answers in that particular div right?
1 Answer
James Arroyo
645 PointsThe getElementById() method returns the element that has the ID attribute with the specified value.
I.e. getElementById(.name) would refer to getting the an element within your HTML body that has a class of name.
or getElementById(#name) would refer to getting an element within your HTML body that has an ID of name.