onkeydown Event Sample

This sample demonstrates the implementation of the onkeydown event. In Internet Explorer 5 and later, most keys that fire the onkeydown event can be canceled.

Type some text into the field. If the check box is checked, the key strokes do not show up in the text field, and "[trap]" is displayed in the textarea element. If the check box is not checked, the key strokes are displayed in both the text field and the textarea element.

onkeydown Sample




[Right-click and choose View Source from the shortcut menu.]

© 2007 Microsoft Corporation. All rights reserved. Terms of use.