Presentation is loading. Please wait.

Presentation is loading. Please wait.

Forms. Form An HTML form is a section of a document containing normal content, special elements called controls (checkboxes, radio buttons, buttons, etc.),

Similar presentations


Presentation on theme: "Forms. Form An HTML form is a section of a document containing normal content, special elements called controls (checkboxes, radio buttons, buttons, etc.),"— Presentation transcript:

1 Forms

2 Form An HTML form is a section of a document containing normal content, special elements called controls (checkboxes, radio buttons, buttons, etc.), controls. When a form is submitted, all fields on the form are being sent. The tag tells the browser where the form starts and ends with. You can add all kinds of HTML tags between the and tags.

3 Controls Users interact with forms through named controls. control "control name" is given by its name attribute. Each control has both an initial value and a current value, both of which are character strings.

4 Control types Text Fields Password Field Text Areas Radio Buttons Checkboxes Selection List Button …….

5 Forms Text Fields Text fields are used when the user to type letters, numbers, etc. in a form. Eg: First name: Last name:

6 Forms Password Field defines a eg Password:

7 Forms Text Areas Text areas are used for multiple-line text entry. The default size of the text box is 1 row by 20 characters. Change the size using the COLS and ROWS attributes. example of a text area with a text box 40 characters wide by 7 rows

8 Forms Radio Buttons Radio Buttons are used when user to select one of a limited number of choices. Male Female

9 Forms Checkboxes Checkboxes are used when the user to select one or more options of a limited number of choices. I have a bike I have a car:

10 Forms The tag is used to create a drop- down list. popo peepe momu akku

11 Forms Button To create a button three types of buttons submit buttons: reset buttons: push buttons:

12 Forms Submit Button submit buttons: When activated, a submit button submits a form. A form may contain more than one submit button. defines a submit button. A submit button is used to send form data to a server. The data is sent to the page specified in the form's action attribute. The file defined in the action attribute Username:

13 Forms Reset button reset buttons: When activated, a reset button resets all controls to their initial values. Used to reset all values in the form

14 Forms push buttons: Push buttons have no default behavior. Each push button may have client-side scripts associated with the element's event attributes. When an event occurs (e.g., the user presses the button, releases it, etc.), the associated script is triggered.

15 Forms HTML Forms A form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. The tag is used to create an HTML form:. input elements.

16 Forms action URL Specifies where to send the form- data when a form is submitted action Method get and post Specifies the method to use when sending form-data name name Specifies the name of a form name get  Adds the form-data to the URL in URL?name=value&name=value post  Sends the form-data as an HTTP post transaction

17 Forms popo Registration Form First Name Last Name Address Sex Male Female Hobby Reading Dancing Sleeping Watching TV State

18 Forms popo peepe momu akku District popo peepe momu akku User Name Password Confirm Password

19 REDIRECT VIA SUBMIT <FORM METHOD="GET" ACTION="index.htm"

20 SIMULATING BACK BUTTON

21 Forms


Download ppt "Forms. Form An HTML form is a section of a document containing normal content, special elements called controls (checkboxes, radio buttons, buttons, etc.),"

Similar presentations


Ads by Google