Forms
Types of Fprms
ADDING TEXT: 1 - Text input
2- Password input
3- Text area
Making Choices
1- Radio buttons
2- Checkboxes
3- Drop-down boxes
Submitting Forms:
1- Submit buttons
2- Image buttons
Uploading Files
- File upload
some iformation about form
-
Whenever you want to collect information from visitors you will need a form, which lives inside a form element.
-
Information from a form is sent in name/value pairs.
-
Each form control is given a name, and the text the user types in or the values of the options they select are sent to the server.
-
HTML5 introduces new form elements which make it easier for visitors to fill in forms.
EVENTS in JS
EVENTS basiclly is about how to deal with the inputs and the action that your websit take from the user
Types of event
-
MOUSE EVENTS (click, double click, hover,…etc)
-
KEYBOARD EVENTS (input,keydown,keypress,keyup)
-
FORM EVENTS (submit,change,input)
Information about EVENT
-
Events are the browser’s way of indicating when something has happened (such as when a page has finished loading or a button has been clicked).
-
Binding is the process of stating which event you are waiting to happen, and which element you are waiting for that event to happen upon.
-
When an event occurs on an element, it can trigger a JavaScript function. When this function then changes the web page in some way, it feels interactive because it has responded to the user.
-
You can use event delegation to monitor for events that happen on all of the children of an element.
-
The most commonly used events are W3C DOM events, although there are others in the HTMLS specification as well as browser-specific events.