Jump to content
Larry Ullman's Book Forums

What Does The Code On The Half Page Of 344 To Do With Innerhtml?


Recommended Posts

This could be a very very silly question. But I'll just ask anyway.

 

The context around the sample code on the top half page of 344 seems to me suggest that it's about using innerHTML. however, the code isn't. So I must've missed some steps. Would you please kindly shed some light?

 

I understand this is a silly question, so a few words will do. I'd appreciate it!

Link to comment
Share on other sites

Sorry for the confusion. First, there is an error on that page, listed on the book's errata page. Specifically it should be adding functionality to go back, not to print. But second, you are correct, that code doesn't really reflect using innerHTML. I must have lost my mind there. Apologies for that. 

 

What you could do as an example of innerHTML is to create an empty DIV, then change its innerHTML to include a PRINT button if PRINT is supported. Perhaps that was my original thinking before I lost my mind.

 

Apologies again for the confusion.

  • Upvote 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...