国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

App下載
首頁javascripttext_inputjQuery Form - 如何顯示您在文本字段中鍵入的內(nèi)容

jQuery Form - 如何顯示您在文本字段中鍵入的內(nèi)容

我們想知道如何顯示您在文本字段中鍵入的內(nèi)容。


<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").keypress(function (e) {
                var c = String.fromCharCode(e.which);
                $("p").append($("<span/>")).children(":last").append(document.createTextNode(c));
                $("div").text(e.which);
            });
        });
    </script>
  </head>
  <body>
     <input type="text" />
      <p>Add text - </p>
      <div></div>
  </body>
</html>