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 trial

JavaScript JavaScript and the DOM (Retiring) Making Changes to the DOM Appending Nodes

zabi kadamzadeh
zabi kadamzadeh
5,745 Points

Appending Nodes

Hi

Can I append node(s) to a parent node permanently. In other words, added node remains a child node when the page is reloaded. Is this possible? Thanks

1 Answer

Ioannis Leontiadis
Ioannis Leontiadis
9,828 Points

Hello Zabi,

using javascript for client side scripting is meant for adding interactivity to web pages. The html file which is read by your browser is served from the server where it is stored. I suppose that by permanent you mean changing this html file. If that is the case, it is a server side matter and has little to do with the course you are attending at the moment.

A short story: Imagine that you are requesting a copy of a file from a friend of yours. You then get your own copy and start making changes to it. If you request another copy of the original file from your friend, the changes you have made will not be there because they were made in your copy. The file is the html and you are javascript.

Hope that helped!