jQuery keyup Event RUN
 
1
<!DOCTYPE html>
2
<html>
3
    <head>
4
        <title>Keyup Event</title>
5
        <meta charset="UTF-8">
6
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
        <script src="https://code.jquery.com/jquery-2.0.0.js"></script>
8
        <script>
9
        $(document).ready(function(){
10
            var time = 0;
11
            $('#age').keyup(function(){
12
                time++;
13
                $('#result').html("Keyup lần thứ " + time + ". Giá trị nhận được là " + $(this).val());
14
            });
15
        });
16
        </script>
17
    </head>
18
    <body>
19
       <input type="text" id="age" value=""/>
20
       <div id="result">
21
           
22
       </div>
23
    </body>
24
</html>