Jump to content
Sign in to follow this  

Clarifying where innerHTML is

Recommended Posts

I'm going through the JavaScript tutorials, and I am SO IMPRESSED! Wow - with absolutely no JS background, I've been modifying the examples successfully and doing some fun things. Thank you!

However, I have one suggestion. From the very beginning, it was totally unclear to me where "innerHTML" was referring to. It took a long time to figure that out. In the tutorials, instead of putting just:

'<p id="demo"></p>', could I suggest you change that to:

'<p id="demo">This is the space referred to by document.getElementById("demo").innerHTML</p>'?

Until I understood that, I had no idea where the text created by the JavaScript was going to go.

Thanks again for a wonderful set of tutorials!

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...