Javascript examples for DOM HTML Element:Input Text
On typing/entering data in text box and output value when focus lost
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//www. ja v a2 s . c o m document.getElementById('inc_address').addEventListener('blur', function() { console.log(this.value); }, false); } </script> </head> <body> <br> Address of Patient <br> <input type="text" name="inc_patientAddress" id="inc_address" required> </body> </html>