Javascript method to remove focus: 1. Use the onblurs attribute, the syntax "onblur="js code that needs to be executed"; 2. Use the blur() function, the syntax "$(selector).blur(function );".
The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.
javascript focus removal
1. Use the onblurs attribute
The onblur attribute is triggered when the element loses focus.
Syntax
onblur="SomeJavaScriptCode"
HTML tags that support this event attribute: