Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Articles Thread, HTML Forms and Input in HTML / XHTML; HTML Forms and Input Forms A form is an area that can contain form elements. Form elements are elements that ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=5571


Reply
LinkBack Thread Tools Display Modes
HTML Forms and Input
 
 
The God Father
Developer's Avatar

Reply With Quote
 
Join Date: Jul 2008
Location: NDC
Posts: 5,425
28-10-2008, 07:16 PM
 
HTML Forms and Input


Forms

A form is an area that can contain 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.
A form is defined with the <form> tag.
HTML Code:
<form>
  <input>
  <input>
</form>
Input

The most used form tag is the <input> tag. The type of input is specified with the type attribute. The most commonly used input types are explained below.
Text Fields

Text fields are used when you want the user to type letters, numbers, etc. in a form.
HTML Code:
<form>
First name: 
<input type="text" name="firstname">
<br>
Last name: 
<input type="text" name="lastname">
</form>
How it looks in a browser:
First name:
Last name: Note that the form itself is not visible. Also note that in most browsers, the width of the text field is 20 characters by default.
Radio Buttons

Radio Buttons are used when you want the user to select one of a limited number of choices.
HTML Code:
<form>
<input type="radio" name="sex" value="male"> Male
<br>
<input type="radio" name="sex" value="female"> Female
</form>
How it looks in a browser:
Male
Female Note that only one option can be chosen.
Checkboxes

Checkboxes are used when you want the user to select one or more options of a limited number of choices.
HTML Code:
<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>
How it looks in a browser:
I have a bike:
I have a car:
I have an airplane: The Form's Action Attribute and the Submit Button

When the user clicks on the "Submit" button, the content of the form is sent to another file. 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.
HTML Code:
<form name="input" action="html_form_action.asp"
method="get">
Username: 
<input type="text" name="user">
<input type="submit" value="Submit">
</form>
How it looks in a browser:
Username: If you type some characters in the text field above, and click the "Submit" button, you will send your input to a page called "html_form_action.asp". That page will show you the received input.
__________________
I Love Walking In The Rain Cuz Nobody Know I'm Crying !!
 
 
 
 
Junior Member

Reply With Quote
 
Join Date: May 2009
Posts: 9
23-05-2009, 01:48 AM
 
10075Votre clinique en ligne <a href="http://cgi3.ebay.fr/ws/eBayISAPI.dll?ViewUserPage&userid=cialis-achat&hc=1&key=achat-cialis">achat cialis</a> , 21994 <a href="http://cgi3.ebay.fr/ws/eBayISAPI.dll?ViewUserPage&userid=cialis-achat"> Achat de cialis en France avec livraison</a> , 23796 acheter cialis
 
 
 
Reply

Articles Thread, HTML Forms and Input in HTML / XHTML; HTML Forms and Input Forms A form is an area that can contain form elements. Form elements are elements that ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=5571


Bookmarks

Tags
forms, html, input

« HTML Layout | - »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adobe Acrobat Forms Plug-in 3.5 Developer Software and Programs 0 14-11-2008 10:11 PM
Lesson : HTML Linking to E-Mail in HTML Tutorial Developer Articles 0 17-10-2008 09:14 PM
Ebook on Windows Forms Programming in C# Developer Software and Programs 0 17-10-2008 06:46 AM
Basic Input/Output Developer Classes & Source Code 0 04-09-2008 10:18 PM
AL forms special committee on Israeli crimes against Palestinians SABRAWY News 0 27-05-2008 10:58 PM