在JavaScript中使用数组获取密钥的ascii代码? [英] Fetch ascii code for keys using array in JavaScript?
本文介绍了在JavaScript中使用数组获取密钥的ascii代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在JavaScript中使用数组获取密钥的ascii代码?
Fetch ascii code for keys using array in JavaScript?
推荐答案
查看您的问题,我想,您正在寻找从字符或密钥中查找ASCII代码键中的代码/字符代码。不知道你为什么使用数组这个词。
从字符中查找ASCII代码 -
Looking at your question, I guess, you are looking for either finding ASCII code from character or Key Codes/ Char Codes from keys. Not sure about why you have used the word "array" though.
To find ASCII code from character-
var a = 'a';
alert(a.charCodeAt());
ASCII代码 [ ^ ]
以下链接可帮助查找关键代码/字符代码
如何查找特定密钥的密钥代码 [ ^ ]
KeyboardEvent.keyCode [ ^ ]
希望,它有所帮助:)
如果您正在寻找其他东西,请通过更好地描述您的问题让我知道。
List of ASCII Codes[^]
Following links may help finding key codes/char codes
How to find the key code for a specific key[^]
KeyboardEvent.keyCode[^]
Hope, it helps :)
In case you are looking for something else, please let me know with little better description about your problem.
这篇关于在JavaScript中使用数组获取密钥的ascii代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文