Events
Events are at the heart of interactive web pages. They trigger behaviors based on your visitors’ actions, like clicking a link, mousing over an image, or simply loading a page. But not all events work with all tags. For example, the onLoad event works only with web pages and images, not paragraphs, divs, or any other page element. The Event menu in the Behaviors panel can help; it lists only those events available for the tag you’re targeting.
Current browsers—Internet Explorer 9, Safari, Firefox, and Chrome—support events for many HTML tags. Many events work with other tags as well, such as headline, paragraph, and div tags. But don’t go crazy. Making an alert message appear when someone double-clicks a paragraph is more likely to win your site the Hard-To-Use Website of the Month award than a loyal group of visitors.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access