How to remove focus from the input HTML tag using JavaScript?
Originally posted here!
To remove the focus on an input tag element in HTML, you can use the blur() method on the element using JavaScript.
// remove focus from the element
element.blur();
Let's say we have an input tag and a button like this,
<!--...
melvingeorge-me.hashnode.dev2 min read