Top profile Call Girls In Meerut [ 7014168258 ] Call Me For Genuine Models We...
Lectures-web
1. Forms
A form is an area that can contain form elements.
Form elements
Form elements are elements that allow the user to
enter information (like text fields, textarea fields,
drop-down menus, radio buttons, checkboxes, etc.)
in a form.
2. A form is defined with the <form> tag. Like
<form>
.
input elements
.
</form>
Example
<form>
First name:
<input type="text" name="firstname" />
<br />
Last name:
<input type="text" name="lastname" />
</form>
3. Input Elements and the INPUT tag
The most used form tag is the <input>
tag. The type of input is specified with
the type attribute.
The available types are
•Text Fields
•Radio Buttons
•Checkboxes
•Submit Buttons
•Reset Buttons
4. Text Fields
Text fields are used when you want the user to type
letters, numbers, etc. in a form.
Example
<form>
First name:
<input type="text" name="firstname" />
<br />
Last name:
<input type="text" name="lastname" />
</form>
5. Radio Buttons
Radio Buttons are used when you want the user to
select one of a limited number of choices.
Example
<form>
<input type="radio" name="sex" value="male" />
Male
<br />
<input type="radio" name="sex" value="female" />
Female
</form>
6. Checkboxes
Checkboxes are used when you want the user to select one or
more options of a limited number of choices.
Example
<form>
I have a bike:
<input type="checkbox" name="vehicle" value="Bike" />
<br />
I have a car:
<input type="checkbox" name="vehicle" value="Car" />
<br />
I have an airplane:
<input type="checkbox" name="vehicle" value="Airplane" />
</form>
7. Submit Buttons
Submit buttons are used when you want the user to submit the
content of the form to the Server.
Example
<form name="input" action="html_form_submit.asp"
method="get">
Username:
<input type="text" name="user" />
<input type="submit" value="Submit" />
</form>
Note
The form's action attribute defines the name of the file to send the
content to. The file defined in the action attribute usually does
something with the received input.
8. Reset Buttons
Reset buttons are used when you want the user to
clear the content of the form
Example
<form name="input"
action="html_form_submit.asp" method="get">
Username:
<input type="text" name="user" />
<input type="submit" value="Submit" />
<input type=“Reset" value=“Reset" />
</form>
9. The Select list Element and the “SELECT” Tag
Select Lists (Drop Down lists ) are used when
you want the user to select one of a limited
number of choices.
Example
<form>
Gender
<SELECT NAME=“gender”>
<OPTION>Male
<OPTION>Female
</SELECT>
</form>