Javascript examples for DOM Event:onblur
The onblur event occurs when an object loses focus.
Bubbles | No |
---|---|
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" onblur="myFunction()"> <script> function myFunction() {/*from w w w. j a v a2 s . co m*/ console.log("Input field lost focus."); } </script> </body> </html>