Keyboard events
onkeydown//triggers when the keyboard is pressed
onkeyup//But triggered when the keyboard is lifted
Event.keycode//numeric type key values for keyboard keys
Function key Ctrlkey Shiftkey Altkey//Returns a Boolean value
Not all elements can receive keyboard events, can respond to user input elements, can hold the focus of elements to receive keyboard events
Document is a keyboard event that can receive
Focus: Enables the browser to distinguish between objects entered by the user, and when an element has the focus, he can receive input from the user.
We can set the focus of the element in some way
1 views
2 Tab key Toggle
3 JS
Not all elements can receive focus, and elements that respond to user actions have focus
What's the focus event?
onfocus//What to do when getting focus
onblur//What to do when you lose focus
Obj.focus ()//Add focus to Element
Obj.blur ()//method of canceling focus
Obj.select ()//Select text can be operated by the focus element is not supported under the standard
JS keyboard events and focus events