Html & Css #6 : formulaires

Download Html & Css #6 : formulaires

Post on 05-Jul-2015

294 views

Category:

Software

2 download

DESCRIPTION

Html & Css #6 : formulaires

TRANSCRIPT

  • 1. Les formulaires

2. 1. Structure html 3. A quoi sert un formulaire ?A form is a component of a Web page thathas form controls, such as text fields, buttons,checkboxes, range controls, or color pickers.A user can interact with such a form,providing data that can then be sent to theserver for further processing (e.g. returningthe results of a search or calculation).Source : w3.org 4. form (1)The form element represents a collection ofform-associated elements, some of which canrepresent editable values that can besubmitted to a server for processing.Source : w3.org 5. form (2) 6. Attributs du formulaire (1) 7. Attributs du formulaire (2)Method :- get : transfert des donnes par lurl- post : transfert invisible des donnesAction :- Page de traitement du formulaire- ex : traitement.php 8. input (1)The input element represents a typed datafield, usually with a form control to allow theuser to edit the data.Source : w3.org 9. input (2) 10. textarea (1)The textarea tag defines a multi-line textinput control.Source : w3.org 11. textarea (2) 12. label (1)The label element represents a caption in auser interface. The caption can be associatedwith a specific form control, known as thelabel element's labeled control, either usingthe for attribute, or by putting the formcontrol inside the label element itself.Source : w3.org 13. label (2)Nom : 14. 2. Attributs 15. size (1)The size attribute gives the number ofcharacters that, in a visual rendering, the useragent is to allow the user to see while editingthe element's value.Source : w3.org 16. size (2)Nom : 17. maxlength / minlength (1)A form control maxlength attribute declaresa limit on the number of characters a usercan input.Source : w3.orgA form control minlength attribute declaresa lower bound on the number of charactersa user can input.Source : w3.org 18. maxlength / minlength (2)Nom : 19. value (1)The value content attribute gives the defaultvalue of the input element.Source : w3.org 20. value (2)Nom : 21. readonly (1)The readonly attribute is a boolean attributethat controls whether or not the user canedit the form control.Source : w3.org 22. readonly (2)Nom : 23. required (1)The required attribute is a boolean attribute.When specified, the element is required.Source : w3.org 24. required (2)Nom : 25. placeholder (1)The placeholder attribute represents a shorthint (a word or short phrase) intended to aidthe user with data entry when the controlhas no value.Source : w3.org 26. placeholder (2)Nom : 27. Merci pour votre attention.