Stop people from writing in text input boxes : blur « jQuery « JavaScript DHTML






Stop people from writing in text input boxes

    
<html>
  <head>
    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $("input").focus(function () {
                  $(this).blur();

            });
        });
    </script>
  </head>
  <body>
    <body>
     <p><input type="text" /> <span>focus event fire</span></p>
    </body>
</html>

   
    
    
    
  








Related examples in the same category

1.To triggers the blur event on all paragraphs:
2.blur(fn): blur event fires when an element loses focus