Remove focus from a text field:
document.getElementById("myText").blur();
Try it Yourself »
Remove focus from an <a> element:
document.getElementById("myAnchor").blur();
Try it Yourself »
The blur()
method removes focus from an element.
HTMLElementObject.blur()
NONE |
NONE |
element.blur()
is a DOM Level 2 (2001) feature.
It is fully supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 9-11 |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!