• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. Dynamic HTML: Changing Web P... > The innerHTML, innerText, outerHTML,...

The innerHTML, innerText, outerHTML, and outerText Properties

One of the most precise ways to rewrite a web page is with the innerHTML, innerText, outerHTML, and outerText properties. (See “The innerHTML, innerText, outerHTML, and outerText Properties” in Chapter 5, “Using Core HTML Properties.”) Here’s what those properties do. Note that innerHTML is the only one supported by Netscape Navigator so far:

  • innerHTML changes contents of element between start and end tags, which may include HTML.

  • innerText enables you change the text between the start and end tags of an element.

  • outerHTML changes contents of an element, including start and end tags, treats text as HTML.

  • outerText enables you to change all the element’s text, including the start and end tags.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint