By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,715 Members | 1,256 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,715 IT Pros & Developers. It's quick & easy.

ASCII value of enter and alt keys onkeypress

P: 40
How to get the ascii value of enter key using javascript events?
Nov 27 '08 #1
Share this Question
Share on Google+
4 Replies


acoder
Expert Mod 15k+
P: 16,027
Check that the keyCode is 13.
Nov 27 '08 #2

P: 40
I just want to call an ajax function on pressing the enter key and alt key.since i have a submit button,the form gets submitted if i press enter.Instead,an ajax function should be called when i press enter or alt.Also,i just want to do it with the help of ASCII values of those two buttons on keypress event.Help me!!
Nov 27 '08 #3

acoder
Expert Mod 15k+
P: 16,027
Threads merged. Please formulate your questions properly and do not double post your questions.

Moderator.
Nov 27 '08 #4

acoder
Expert Mod 15k+
P: 16,027
For the alt key, use the altKey property. For more information, check out the example links on this page.
Nov 27 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.