Javascript examples for DOM Event:Element Event Attribute
The onfocusout event occurs when an element is about to lose focus.
Bubbles | Yes |
---|---|
Cancelable | No |
Supported HTML tags: | ALL HTML elements, EXCEPT: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title> |
<!DOCTYPE html> <html> <body> <input type="text" id="fname"> <script> document.getElementById("fname").onfocusout = function() {myFunction()}; function myFunction() {//from www.j a va 2 s . c o m console.log("Input field lost focus."); } </script> </body> </html>