- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path19_key_events.js
More file actions
Latest commit
18 lines (14 loc) · 443 Bytes
/
Copy path19_key_events.js
File metadata and controls
18 lines (14 loc) · 443 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// keypress - when key is pressed
// keydown - when key is down
// keyup - when key is released
constinputName=document.querySelector('.inputName');
//
// inputName.addEventListener('keypress', function () {
// console.dir('u r press key');
// });
// inputName.addEventListener('keydown', function () {
// console.log('u r press key');
// });
// inputName.addEventListener('keyup', function () {
// console.dir(inputName);
// });