Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

the letter of keycode

Status
Not open for further replies.

cyberwolf14

Programmer
Aug 27, 2001
65
BE
Hello,

Code:
<textarea onkeyup=&quot;alert(window.event.keyCode)&quot;></textarea>

If I write something in this textarea it gives me the keycode if the letter i've written. But I want to know the letter of the keycode.

How do I know the letter from a keycode??
 
There is a quick way event.key****, but I don't know it.
The difficult time consuming way would be:
str = document.*.*.value;
str = str.substring(str.length-1,str.length)
 
Yes but theres an easier way, somthing like this:
givemecode(window.event.keyCode)

but givemecode() is wrong and I don't know what it has to be
 


It might be helpful to combine it with this fromCharCode:

ar xrr = String.fromCharCode(64);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top