Forms and JS Events

** FORMS - HTML ** The HTML <form> element is used to create an HTML form for user input: The HTML element is the most used form element.An element can be displayed in many ways, depending on the type attribute. The defines a radio button. Radio buttons let a user select ONE of a limited number of choices.
he defines a checkbox.Checkboxes let a user select ZERO or MORE options of a limited number of choices. The defines a button for submitting the form data to a form-handler.The form-handler is typically a file on the server with a script for processing input data.The form-handler is specified in the form’s action attribute.
An ** HTML form ** is used to collect user input. The user input is most often sent to a server for processing. Creating forms is need to open the form element as the root of the form. Which include all other form elements, such as :
inputs , label ,textarea ,select ,and buttons. The form element requires you to pass two attributes, which are the action and method attributes.
The action attribute allows the developer to specify the URL where the form data will go.
The method attribute allows the developer to specify whether the form data should be sent via get or post.
__ Forms Work ?__ A user fills in a form and then presses a button to submit the information to the server . The name of each form control is sent to the server along with the value the user enters or selects . The server processes the information using a programming language such as PHP , C# , VB .net , or Java , It may also store the information in a database . The server creates a new page to send back to the browser based on the information received .
JS Events
Events are actions or occurrences that happen in the system you are programming, which the system tells you about so you can respond to them in some way if desired. For example, if the user selects a button on a webpage, you might want to respond to that action by displaying an information box. In this article, we discuss some important concepts surrounding events, and look at how they work in browsers. This won’t be an exhaustive study; just what you need to know at this stag
An HTML event can be something the browser does, or something a user does.
Here are some examples of HTML events:
-
An HTML web page has finished loading
-
An HTML input field was changed
-
An HTML button was clicked