23.04.2013 Views

javascript

javascript

javascript

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 7 ■ TRAVERSING AND MODIFYING THE DOM TREE<br />

266<br />

Figure 7–3. Writing the data member changes the nodeValue member, too.<br />

Note that this changes the display in Firefox. However, if you press Ctrl+U (Cmd+U) to view the<br />

XHTML markup, the link still contains "LinkedIn", as Figure 7–4 displays. So, JavaScript modifies the<br />

DOM tree floating around in memory, not the XHTML file on the server.<br />

Figure 7–4. JavaScript modifies the DOM tree, not the markup it represents.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!