Feed on

JavaScript Events

Difficulty: Advanced


  • Presentation

To ensure that JavaScript events can be triggered with both the mouse and the keyboard either a device independent event handler OR a mouse dependent event handler (such as onmouseover) and a keyboard dependent event handler (such as onkeypress) must be used. Keep in mind that some event handlers change their device dependence based on where they are used. For example, the onclick event handler is device independent (works with both the mouse and the keyboard), but only on elements that can receive keyboard focus (links and form elements that can be tabbed to).

Leave a Reply

MDTAP | 2301 Argonne Drive, Room T17 Baltimore, Maryland 21218| Voice: 410-554-9230 Toll Free ⁄ Voice 1-800-832-4827|Email: mdtap@mdtap.org