<input onfocusout="myFunction()"> - Javascript DOM Event

Javascript examples for DOM Event:onfocusout

Description

The onfocusout event occurs when an element is about to lose focus.

Summary

Bubbles Yes
Cancelable No
Supported HTML tags: ALL HTML elements, EXCEPT: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title>

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<input type="text" onfocusout="myFunction()">

<script>
function myFunction() {//from   w  ww. j  ava 2 s  .co  m
    console.log("Input field lost focus.");
}
</script>

</body>
</html>

Related Tutorials