Your first Web Form.
How To Structure A Web Form.
It’s like a bridge to the user, allowing them to interact with the website. It could be from collecting data to letting the user interact with the site.
Keep the form as simple as possible and only ask for the information you absolutely need.
Introduction To Events.
For some reason the first comparison that came into my head was that of a relay race. Setting up an ‘event listener’ is like all the runners getting ready to hear the gunshot go off; the gunshot is the event. After that happens, the baton follows the course of action of the code. Generating a random number, chosing a link to execute, presenting a preprogramed text bubble to pop up, or a dropdown menu to show. Whatever the runners are doing, none of them can do anything until that gun is fired. That is the event all the runners are listening for.
It will need to know what event it is looking for and then what you want it to do once the event is ‘heard.’
The event object is the specific element we are directing the eventListener to pay attention to for our specific action, or event. It is helpful to be able to specify this particular element in case you were wanting to inact a change in the code.
Order of operation. With even bubbling, the events find the most inner nested element and begin executing, whereas event capturing starts with the least nested item and works its way inward.