javascript 通过键名获取键盘的keyCode方法 不废话,直接看代码,需要的根据需求完善。vargetKeyCode=function(key){varkey_code;switch(key){case'Bac keyCode