Advertisement
StefiIOE

Untitled

Jun 20th, 2020
1,132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <script src = "jquery-3.5.1.min.js"></script>
  5.     <script>
  6.         $(document).ready(function () {
  7.             $("input").focus(function () {
  8.                 $(this).css("background-color","blue");
  9.  
  10.             });
  11.             $("input").blur(function () {
  12.                 $(this).css("background-color","red")
  13.  
  14.             });
  15.  
  16.         });
  17.     </script>
  18. </head>
  19. <body>
  20. Name<input type="text" name="fullname">
  21. <br>
  22. Email<input type="text" name="email">
  23. </body>
  24. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement