OnClick vs. onKeypress

From Level Access Web Labs
Jump to: navigation, search

<!DOCTYPE html> onclick vs. onkeypress test

onClick vs. onKeypress for a Simulated Control

This page is to show the difference in onClick support for standard HTML buttons and a <div> that is a simulated button. Interact with each element using the left mouse click and the Enter key to see which event is fired. Edit the DOM to remove the onKeypress event from the simulated button to see if the onClick event is still supported.

Click Me!