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

Q&A

Q1:Can I avoid assigning an ID attribute to every DOM object I want to handle with a script?
A1: Yes. While the scripts in this hour typically use the ID attribute for convenience, you can actually locate any object in the page by using combinations of node properties such as firstChild and nextSibling.
Q2:Can I include HTML, such as <B> tags, in the new text I assign to a text node?
A2: No, text nodes are limited to text. To assign more complex HTML to a node, you need to remove the existing node and replace it with a new one.
Q3:Is there a reference that specifies which DOM properties and methods work in which browser versions?
A3: Yes, several Web sites are available that keep up-to-date lists of browser features. Some of these are listed in Appendix A, “Other JavaScript Resources.”


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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