Click the button to remove the DIV's event handler.
This example uses the addEventListener() method to attach a click event to the document.
This example uses the addEventListener() method to attach a click event to a button.
In this example, the keyboard key "d" is for dialog
The accesskey attribute specifies a shortcut key to activate/focus an element.
Click the button to open the dialog window.
Click anywhere in the document.
Note: The shortcut varies from different browsers:
Note: The addEventListener() method is not supported in Internet Explorer 8 and earlier versions.
- IE, Chrome, Safari, Opera 15+: [ALT] + accesskey
- Opera prior version 15: [SHIFT] [ESC] + accesskey
- Firefox: [ALT] [SHIFT] + accesskey
Note: The dialog element is only supported in Chrome 37+, Safari 6+ and Opera 24+.