Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Exemplo</title>
- <style type="text/css">
- .focu {border:1px solid red;}
- </style>
- <script type="text/javascript" src="js/jquery-1.4.2.js"></script>
- <script type="text/javascript">
- $(document).ready (function(){
- $('.campo').focus(function(){
- $(this).toggleClass ('focu');
- });
- $('.campo').blur(function(){
- $(this).toggleClass ('focu');
- });
- })
- </script>
- </head>
- <body>
- <input type="text" name="nome" class="campo" />
- <br />
- <br />
- <textarea rows="10" cols="50" class="campo"></textarea>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement