ptg16476052
Summary 571
20
});
});
When the page is ready, I apply the same onclick handler to all the links on the page
with the class popup. The anonymous event handler opens a new window with the URL
stored in this.href, which returns the URL in the link that the user clicked. It then calls
the preventDefault() method on the event. It’s used instead of just returning false
because it doesn’t disrupt other event handlers that may be fired in addition to this one.
Summary
In this lesson, you learned how to link a document to a new or existing window. In addi-
tion, you learned how to create inline frames and link them by using the tags listed in
Ta ble 20.5.
TABLE 20.5 New Tags Discussed in Lesson 20
Tag Attribute Description