Stop Low Resolution Warning Sign

Transcript

Transcript of the tutorial. TOP


          All right then.

          So hopefully now we know all the basics of events and event listeners, which is an awesome thing because
          
          they used all the time in JavaScript for front end development.
          
          Now one of the times they used a lot is with web forms.
          
          Now web forms exist to capture some kind of data or information from a user.
          
          For example, we might have some kind of sign in form where we capture a username and a password from
          
          the user.
          
          Another example, we might have a customer feedback form which captures an email, a name and some kind
          
          of review.
          
          So either way we're capturing data or information from a user, and in these cases we're going to be
          
          using events to capture that information.
          
          In particular, we're going to be interested in the submit events of forms.
          
          This is when a user clicks the submit button at the bottom of a form once they've filled it in.
          
          So clicking this button fires not only a click event on this button, but it also fires a submit event
          
          on the form itself.
          
          So we could set up an event listener to react to this submit event, and that's when we could go about
          
          reading the values inside the form in the different fields and capturing that data.
          
          Now, other kinds of events that go hand in hand with web forms are keyboard events, and that's where
          
          we can detect when a user presses a key on their keyboard or releases a key on their keyboard.
          
          And we can also check if they have their alt or their shift key pressed and much more, too.
          
          So we're going to be exploring these kinds of form events in this chapter.
          
          And we're also going to be taking a quick look at regular expressions, too, which are a nice way for
          
          us to validate the type of data a user types into a form field.
          
          So all of that is coming up in this chapter.