asp.net.ph

Skip Navigation Links

onkeydown Event


Fires when a key is pressed down over an element.

Syntax

Inline <element onkeydown = "handler" ... >
Script object.onkeydown = handler

Remarks

Bubbles Yes
Cancels Yes
To invoke Press any keyboard key.
Default action Returns a number specifying the keyCode of the key that was pressed.

Setting event.returnValue=false has no effect on keyboard events used for navigation, on hot keys assigned to the browser, or on system events. The following keys cannot be canceled: TAB, F1 through F12, HOME, END, ESC, DELETE, and the arrow keys.

Event Object Properties

While event handlers in the Document Object Model do not receive parameters directly, the handler can query the event object for data.

Event Object Properties


Applies To

This attribute may be used with most elements.

See Also

onkeypress, onkeyup


Need a break ?
Suggested Reading

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph.

If you have any question, comment or suggestion,
please send us a note