Sunday 7 July 2013

HTML Form Element

HTML Form Element

Form is used to submit data from user computer to server.

A Simple Text Box:                                                    < input type="text" >
A simple Textbox for Password:                                 < input type="password" >
Text box with inbuilt text                        < input type="text" value="Tech Altum" >
Text box with character
limitation of 10                                             < input type="text" maxlength="10" >

Simple dropdown                           

<select>
<option>--Select City--</option>                                                                                                                             <option>New Delhi</option>
<option>Kolkata</option>
<option>Mumbai</option>
<option>Chennai</option>
 </select>



Check Box: For Multiple selection;
 For Example:
 Select Vehical
                                                <input type="checkbox"> Bike
                                                 <input type="checkbox"> Car

Radio button for single selection;
For Example
Select Gender;
                                  <input type="radio" name="gender"> Male
                                    <input type="radio" name="gender"> Female
                                <input type="radio" name="gender"> Others

Textarea:
For multi-line text input
                                   <textarea></textarea>

Input type button:
To call a javascript event on buttonclick
                                                          <input type="button" value="button" >

Input type File
To select a file from client-side
             <input type="file" >

                                                           <input type="submit" value="Submit">

No comments: