Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Blur Event with jQuery</title>
- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
- </head>
- <body>
- <form>
- <input id="field1" type="text" value="Field 1">
- <input id="field2" type="text" value="Field 2">
- </form>
- <script>
- $(document).ready(function() {
- $('#field1').blur(function() {
- alert('Field 1 lost focus!');
- });
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement