2012-06-29 6 views

답변

1

이것은 자바 스크립트 기능입니다. onkeypress 또는 onkeyup을 살펴보십시오.

최선의 선택은 아마도 jQuery를하다 :

$(document).keyup(function(e) { 
    if (e.keyCode == x) { 
    //do something, i.e. alert('popup'); 
    } 
}); 

A few of the key codes: 
Enter  13 
Up arrow 38 
Down arrow 40 
Left arrow 37 
Right arrow 39 
Escape  27 
Spacebar 32 
Ctrl  17 
Alt  18 
Tab  9 
Shift  16 
Caps-lock 20 
Windows key 91 
Backspace 8 
Home  36 
End  35 
Insert  45 
Delete  46