Hello again, everyone.
All right, so we got event binding down, so in this lesson, I want to talk about the key up event.
So now I'm creating an input file in the HTML5.
And here, I'll use the key up event, so we will listen according to the movements coming from the
keyboard.
So I'm pairing it with a method.
And now let's prepare our method.
So when we want to do this in method, let's say the user enters the information on the form page and
wants to save this information by pressing enter.
So here we can examine the user hitting the enter key as an event.
So there is a key code parameter that we can use for this.
Now the key code parameter from the curve event in the method is equal to 13.
The user press the anarky.
Well, I can examine.
So this 13 for Eteocles here.
A different code will be used for different key.
And we can check these codes from Crom!
So now if we look at the browser, I can enter the value from here and when I press enter, as you can
see, the event has been triggered.
So we can now listen when we hit the inner button.
Now we'll listen for every key entered on the keyboard and the event is triggered when this energy is
pressed.
So we can customize this situation a little more if you want.
So in other words, we can only follow the enter key without following all the keys.
It's also come in here and right that enter.
And we won't need to send the parameter.
Now, we don't even need to do a check within the method because we already do that check in the beginning,
right?
Now, when we try this situation in the browser.
When we enter the information and press center, we see the console.
So, my friends, as you can see, we checked the progress of the anarchy and then we printed a console
string value.
So now let's examine how to console the value that we wrote here.
Now, here, I'll use event as parameter again, and in this method, I want to print this event value
instead of constant value and console.
So over this I write event that target, that value.
And here I used the event target attribute and called the value in it.
So here I've used the event target attribute and called the value in it so that when I press enter,
I see what value I entered.
All right, my friends, that is the key feature.
We also talked about how to follow the letters used in the keyboard via input.
All right, so see in the next lesson.