The Wayback Machine - https://web.archive.org/web/20090219061705/http://www.webreference.com:80/html/tutorial13/8.html


spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / html / tutorials / 13 / 8

index123456789101112131415161718192021exercises1

Tutorial 13: Giving Form to Forms

Developer News
Open Source ECM Growing Up
Android's Second Act, G2 Rumors Heat Up
Eclipse Rolls Out PHP Development Tools 2.0

Text boxes

Text boxes are controls that allow a user to enter some text. A text box has a TYPE of text. The name of the control is set with the NAME attribute. The default value is set with the VALUE attribute. The size of the control, in characters, can be specified using the SIZE attribute, and the maximum number of characters that can be entered is set using the MAXLENGTH attribute. Here is a simple text box that shows 16 characters, but can accept up to 50:

<FORM ACTION="/cgi-bin/html/formdump.cgi" 
      METHOD="GET" ENCTYPE="application/x-www-form-urlencoded">
<P>Enter e-mail:
<INPUT
 TYPE="text"
 NAME="email"
 VALUE="user@domain.com"
 SIZE="16"
 MAXLENGTH="50"
>
<INPUT TYPE="submit" VALUE="Submit">
</FORM>

Enter e-mail:

Password boxes

Password boxes are identical to text boxes, except for the fact that whatever the user types is not displayed in the control. Usually, asterisks (*) are displayed in place of the characters. This type of control can be used to enter passwords and other sensitive information, however remember that although the text the user enters is invisible, it is not encrypted or protected in any other way. Password boxes are have a TYPE of password.

<FORM ACTION="/cgi-bin/html/formdump.cgi"
      METHOD="GET" ENCTYPE="application/x-www-form-urlencoded">
<P>Username: <INPUT TYPE="text" NAME="user" SIZE="8">
<BR>Password: <INPUT TYPE="password" NAME="pass" SIZE="8">
<BR><INPUT TYPE="submit" VALUE="Submit">
</FORM>

Username:
Password:

index123456789101112131415161718192021exercises1

Produced by Stephanos Piperoglou

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Copyright 2008 Jupitermedia Corporation All Rights Reserved.

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Django for the Impatient: Blog Building Basics · Introducing the ASP.NET Ajax Frameworks · Windows Forms: Applications
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Restore Analysis Services database using Windows PowerShell and SQL Server 2008 AMO · Indispensable Open Source Network Security Apps · CallFire's BYOC Program Scales Voice Broadcast to Carrier Grade

URL: http://www.webreference.com/html/tutorial13/8.html

Created: May 28, 1998
Revised: February 25, 1999

Morty Proxy This is a proxified and sanitized view of the page, visit original site.