Chapter 16. Dynamic HTML: Changing Web Pages On-the-Fly
Much of JavaScript is all about making your web pages “come alive,” and in this chapter we’re going to focus on that, using a variety of dynamic effects to change your web pages on-the-fly. Here’s an overview of the techniques we’ll see here:
Changing visual properties on-the-fly
Rewriting documents with the
document.write
methodUsing the
insertAdjacentHTML
andinsertAdjacentText
methodsRewriting documents with the
innerHTML
,innerText
,outerHTML
, andouterText
propertiesCreating new elements
Rewriting documents with text ranges
Moving elements using Netscape Navigator layers
Setting element visibility ...
Get Inside JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.