Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript Handling the Blur Event</title> </head> <body> <input type="text" onblur="alert('Text input loses focus!')"> <button type="button">Submit</button> <p><strong>Note:</strong> First click inside the text input box then click outside to see how it works.</p> </body> </html>