Image.onKeyPress
JavaScript 1.2+, JScript 3.0+ Nav4+, IE 4+ Syntax
onKeyPress="command"
Description
The onKeyPress event defines a handler when a key is pressed in the image.
Example
Listing 7.312 defines an event handler for the onKeyPress event within an image.
Listing 7.312 Example of the onKeyPress Event Handler
<img name="circle" src="circle.gif" onKeyPress="alert('An ONKEYPRESS event occurred!')"> |
Get Pure JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.