Focusing and blurring of elements - Basic JavaScript Fast (72) | tabindex, focusin, focusout

Опубликовано: 20 Октябрь 2024
на канале: Begin Coding Fast
32
2

We can control the focusing and blurring of DOM elements, even if they are not allowed to focus by default. The focus and blur events can be triggered by elements. Or, the focus and blur methods can be applied to elements.

If an element is not allowed to focus by default, we can assign a tab index to it, so that generally the elements with a smaller index can be focused first.

The ordinary focus and blur events cannot be used in event delegation because they do not bubble up. If event delegation is to be achieved, focusin and focusout events can be used instead.

2:31 - focus and blur events
5:39 - focus and blur methods
8:39 - tabindex
16:44 - focusin and focusout events

Playlist of my JavaScript course
   • [20 hours] JavaScript tutorial for be...  

Playlist of my HTML5 and CSS3 tutorials
   • [12 hours] HTML and CSS tutorials for...  

Playlist of my algorithm walkthrough
   • Algorithms and data structures | DSA ...  

Playlist of my Java course
   • [14 hours] Java tutorial for beginner...  

Playlist of my Java examples
   • Java projects for beginners | Java pr...  

#javascripttutorial #javascriptfullcourse #begincodingfast #javascript #focusin #focusout