不同键值e.which

switch(e.which){
case 8: keyName = "[退格]"; break;
           case 9: keyName = "[制表]"; break;
           case 13:keyName = "[回车]"; break;
           case 32:keyName = "[空格]"; break;
           case 33:keyName = "[PageUp]";   break;
           case 34:keyName = "[PageDown]";   break;
           case 35:keyName = "[End]";   break;
           case 36:keyName = "[Home]";   break;
           case 37:keyName = "[方向键左]";   break;
           case 38:keyName = "[方向键上]";   break;
           case 39:keyName = "[方向键右]";   break;
            case 40:keyName = "[方向键下]";   break;
           case 46:keyName = "[删除]";   break;
default:keyName = "";    break;


}
本文内容转自 http://uule.iteye.com/blog/798394



你可能感兴趣的:(不同键值e.which)