O'Reilly logo

Pro JavaScript™ Techniques by John Resig

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 6Events

The most important aspect to unobtrusive DOM scripting is the use of dynamically bound events. The ultimate goal of writing usable JavaScript code is to have a web page that will work for the users, no matter what browser they're using or what platform they're on. To accomplish this, you set a goal of the features that you want to use, and exclude any browsers that do not support them. For the unsupported browsers, you then give them a functional, albeit less interactive, version of the site. The benefits to writing JavaScript and HTML interactions in this manner include cleaner code, more accessible web pages, and better user interactions. All of this is accomplished by using DOM events to improve the interaction that occurs ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required