Jump to content

Clarifying where innerHTML is


BrianSmith
 Share

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!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...