Sunday, July 31, 2016

Entry component option in the HTML code

An HTML form is used to select the range of the input provided. The data can be input into the choice of entry components. For example input file, radio buttons, checkboxes, select and datalist.

1. The components of the input file
Component input files function to enter the required data files into web systems are made. example
< input type = "file" name = "jpg" accept = "image/*"/>

2. The components of the radio buttons
On the form input radio buttons there is only one option that is selected, it cannot be used for multiple answer. example
< input type = "radio" name = "man" value = "Choose"/>

3. Component checkbox
Component checkbox has similar function with radio buttons, i.e. to determine the selection. However, in the chexbox can be used to select more than one answer (multi answer). example
< input type = "checkbox" name = "name" value = "Choose" checked/>

4. The components of the Input Image
Component input image aims to place the image files required by the web system, for example an image file URfoto.jpg. example
< input type = "image" src = "URyour-img.gif" alt = "Submit" width = "50" height = "50" >

5. select Components
Component input with type ' select ' input is a component with a lot of choices of values and only allows to choose 1 option only. Other terms of the form of this component is the combo box or list box. An example use of this component is the selection of majors, jobs, etc. example
< select name = "city" >
< option value = "new york" > Informatics </option>
< option value = "LA" > Math </option>

6. Components of datalist
Datalist component is the new form elements in HTML5. DataList used to list list. The components of the datalist providing the autocomplete support basis for selection in the input field. The components of the datalist is-merge between list and input field with the attributes of auto-complete. When you create a selection on a datalist, if there is a letter of the same item/with the data on the data list will then appear a suitable item (auto-complete works). example
< input list = "browsers" name = "browser" >
< datalist id = "browsers" >
< option value = "Chrome" >
< option value = "Firefox" >

demo here

No comments:

Post a Comment