首页javascripttext_inputjQuery Form - 如何阻止人们在文本输入框中写入

jQuery Form - 如何阻止人们在文本输入框中写入

我们想知道如何阻止人们在文本输入框中写入。


<html>
  <head>
    <script type="text/javascript" src='http://code.jquery.com/jquery-1.5.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>