x
 
1
<!DOCTYPE html>
2
<title>My Example</title>
3
4
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
5
<script>
6
  $( function() {
7
    $( "input" ).keyup( function() {
8
      $( "p" ).text( $("input").val() );
9
    });
10
  });
11
</script>
12
13
<input placeholder="Enter your name">
14
<p></p>