Capturing a value of a Key Press

Capturing the value of  keyboard each keys can done using Javascript. Here we can implement the Key Press event in the input box. we can find the value using the following function.

<input type=”text” name=”keyVal” id=”keyVal” keypress=”keyDown(event)” />

function keyDown(e)
// ie not case sensitive ?
dValues=”dKey=” + dKey+” dLet=” + dLet; alert(dValues);

The above function get invoked on each key press on the input box on the browser.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: