typescript html element focus with if else 1

typescript html element focus with if else

focused = document.getElementById('active').focus();

Here is what the above code is Doing:
1. We’re creating a variable called ‘focused’ and setting it equal to the element with the id of ‘active’.
2. We’re calling the focus() method on the element we just created.

Similar Posts