File: input.attr.html

package info (click to toggle)
perlsgml 1996Oct09-6
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,452 kB
  • ctags: 792
  • sloc: perl: 4,639; makefile: 167
file content (199 lines) | stat: -rw-r--r-- 5,179 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<TITLE>INPUT: Attributes</TITLE>
</HEAD>
<BODY>
<H1>INPUT: <BR>Attributes</H1>

<HR><H2><A NAME="align">ALIGN</A></H2>
<p>
Valid for `TYPE=IMAGE'.  Behaves the same as the
<a href="img.attr.html#align">ALIGN</a> attribute for the
<a href="img.html">&lt;IMG&gt;</a> element.
</p>
<H3>Value(s)</H3>
<UL COMPACT>
<LI>top</LI>
<LI>middle</LI>
<LI>bottom</LI>
</UL>
<H3>Default Value</H3>
<STRONG>#IMPLIED</STRONG>
<HR><H2><A NAME="checked">CHECKED</A></H2>
<P>
Indicates that the initial state is on for CHECKBOX or RADIO input
types.
</p>
<H3>Value(s)</H3>
CHECKED
<H3>Default Value</H3>
<STRONG>#IMPLIED</STRONG>
<HR><H2><A NAME="maxlength">MAXLENGTH</A></H2>
<p>
Constrains the number of characters that can be entered
into a text input field. If the value of MAXLENGTH is
greater the the value of the SIZE attribute, the field
should scroll appropriately. The default number of
characters is unlimited.
</p>
<H3>Value(s)</H3>
<CODE>NUMBER</CODE>
<H3>Default Value</H3>
<STRONG>#IMPLIED</STRONG>
<HR><H2><A NAME="name">NAME</A></H2>
<p>
Name for the form field corresponding to this element.
</p>
<H3>Value(s)</H3>
<CODE>CDATA</CODE>
<H3>Default Value</H3>
<STRONG>#IMPLIED</STRONG>
<HR><H2><A NAME="sdapref">SDAPREF</A></H2>
<p>
SDA/ICADD: Generated text prefix.
</p>
<H3>Value(s)</H3>
<CODE>CDATA</CODE>
<H3>Default Value</H3>
<STRONG>#FIXED = Input:</STRONG>
<HR><H2><A NAME="size">SIZE</A></H2>
<p>
Specifies the amount of display space allocated to this
input field according to its type. The default depends
on the user agent.
</p>
<H3>Value(s)</H3>
<CODE>CDATA</CODE>
<H3>Default Value</H3>
<STRONG>#IMPLIED</STRONG>
<HR><H2><A NAME="src">SRC</A></H2>
<p>
Valid for `TYPE=IMAGE'.  Attribute the same as the
<a href="img.attr.html#src">SRC</a> attribute for the
<a href="img.html">&lt;IMG&gt;</a> element.
</p>
<H3>Value(s)</H3>
<CODE>CDATA</CODE>
<H3>Default Value</H3>
<STRONG>#IMPLIED</STRONG>
<HR><H2><A NAME="type">TYPE</A></H2>
Defines the type of data the field accepts.  Defaults to free text. Several
types of fields can be defined with the type attribute:
<dl>
<dt>CHECKBOX
<dd>
Represents a boolean choice.
A set of such elements with the same name represents an n-of-many
choice field.
<p>Example:
</p>
<pre>
  &lt;p&gt;What flavors do you like?
  &lt;input type=checkbox name=flavor value=vanilla&gt;Vanilla&lt;br&gt;
  &lt;input type=checkbox name=flavor value=strawberry&gt;Strawberry&lt;br&gt;
  &lt;input type=checkbox name=flavor value=chocolate checked&gt;Chocolate&lt;br&gt;
</pre>

<dt>HIDDEN
<dd>
Represents a hidden field. The
user does not interact with this field; instead, the VALUE attribute
specifies the value of the field. The NAME and VALUE attributes are
required.
<p>
Example:
</p>
<pre>
    &lt;input type=hidden name=context value="l2k3j4l2k3j4l2k3j4lk23"&gt;
</pre>

<dt>IMAGE
<dd>
Specifies an image resource to
display, and allows input of two form fields: the x and y coordinate
of a pixel chosen from the image. The names of the fields are the
name of the field with `.x' and `.y' appended.  `TYPE=IMAGE' implies
`TYPE=SUBMIT' processing; that is, when a pixel is chosen, the form
as a whole is submitted.
<p>Example</p>
<pre>
    &lt;p&gt;Choose a point on the map:
    &lt;input type=image name=point src="map.gif"&gt;
</pre>

<dt>PASSWORD
<dd>
A text field where the value is obscured as it is entered.
<p>Example:</p>
<pre>
    &lt;p&gt;Name: &lt;input name=login&gt; Password: &lt;input type=password name=passwd&gt;
</pre>

<dt>RADIO
<dd>
Represents a boolean choice. A
set of such elements with the same name represents a 1-of-many choice
field.
<p>Example:</p>
<pre>
    &lt;p&gt;Which is your favorite?
    &lt;input type=radio name=flavor value=vanilla&gt;Vanilla&lt;br&gt;
    &lt;input type=radio name=flavor value=strawberry&gt;Strawberry&lt;br&gt;
    &lt;input type=radio name=flavor value=chocolate&gt;Chocolate&lt;br&gt;
</pre>

<dt>RESET
<dd>
Represents an input option,
typically a button, that instructs the user agent to reset the form's
fields to their initial states. The VALUE attribute, if present,
indicates a label for the input (button).

<dt>SUBMIT
<dd>
Represents an input option,
typically a button, that instructs the user agent to submit the form.

<dt>TEXT
<dd>
Indicates a single line text entry field.
<p>Example:</p>
<pre>
&lt;p&gt;Street Address: &lt;input name=street&gt;&lt;br&gt;
Postal City code: &lt;input name=city size=16 maxlength=16&gt;&lt;br&gt;
Zip Code: &lt;input name=zip size=10 maxlength=10 value="99999-9999"&gt;&lt;br&gt;
</pre>
</dl>

<H3>Value(s)</H3>
<UL COMPACT>
<LI>TEXT</LI>
<LI>PASSWORD</LI>
<LI>CHECKBOX</LI>
<LI>RADIO</LI>
<LI>SUBMIT</LI>
<LI>RESET</LI>
<LI>IMAGE</LI>
<LI>HIDDEN</LI>
</UL>
<H3>Default Value</H3>
<STRONG>TEXT</STRONG>
<HR><H2><A NAME="value">VALUE</A></H2>
<P>
The initial value of the field, or the value
when checked for checkboxes and radio
buttons.
</P>
<H3>Value(s)</H3>
<CODE>CDATA</CODE>
<H3>Default Value</H3>
<STRONG>#IMPLIED</STRONG>
<HR>
Back to <A HREF="input.html"><STRONG>INPUT</STRONG></A><P>
<HR>
<ADDRESS>
<A HREF="DTD-HOME.html">HTML 2.0 DTD</A>
</ADDRESS>
</BODY>
</HTML>