onblur event
The onblur event activates when an element loses focus. Â The event can be specified as a JavaScript expression or the name of a JavaScript function. Â
If an expression is used, the JavaScript keyword this refers to the element that lost focus. Â
If the name of a function is used, the function will receive 2 parameters when called:Â
The browser event object
A reference to the element that lost focus
Example:
The following would draw a red border around the element with focus. Â When the element loses focus, the border is removed.
onfocus: this.style.border = "1px solid red";
onblur: this.style.border = "";
Some documentation pages have recently moved to a new section: Profound AppDev. If you are having trouble finding specific pages, try the documentation search capability or reach out to our Support team!