以下方法返回AZ和0-9中的任意按键,当按下Shift + 4时,其返回相同的代码52.如何在按下美元键时找出按下按键或按键事件时的按键
function keyUpEvent(e)//onkeyup event
{
var chr = String.fromCharCode(e.keyCode);//converts the keycode into a character
alert(chr);//alerts the character
}
但是我需要显示$或%当按下组合键的各个键时。
严重的是,你不需要写标题的3倍。 – JJJ 2013-03-01 12:45:29
像这样[** FIDDLE **](http://jsfiddle.net/adeneo/bd3PQ/)??? – adeneo 2013-03-01 12:47:58
好的,我会在下次更正它。但Stackoverflow不允许提交简短的问题。这就是为什么我把它做得更长..对不起。 – Anoop 2013-03-01 13:08:58