<TEXTAREA>...</TEXTAREA>
Define a multiline text field in a form. The user can enter text inside this
field. There is no limit on the number of characters a user can enter.
The text that is inside this container will be used as the default text.
This element is only valid inside the FORM element.
<!ELEMENT TEXTAREA - - (#PCDATA) -- multi-line text field -->
<!ATTLIST TEXTAREA
%attrs; -- %coreattrs, %i18n, %events --
name CDATA #IMPLIED
rows NUMBER #REQUIRED
cols NUMBER #REQUIRED
disabled (disabled) #IMPLIED -- unavailable in this context --
readonly (readonly) #IMPLIED
tabindex NUMBER #IMPLIED -- position in tabbing order --
accesskey %Character; #IMPLIED -- accessibility key character --
onfocus %Script; #IMPLIED -- the element got the focus --
onblur %Script; #IMPLIED -- the element lost the focus --
onselect %Script; #IMPLIED -- some text was selected --
onchange %Script; #IMPLIED -- the element value was changed --
>
from the HTML 4.0 DTD,
"Copyright ©
World Wide Web Consortium,
(Massachusetts Institute of Technology,
Institut National de Recherche en Informatique et en Automatique,
Keio University).
All Rights Reserved."
Core attributes:
class
id
style
title
Internationalization attributes:
dir
lang
Events:
onclick
ondblclick
onmousedown
onmouseup
onmouseover
onmousemove
onmouseout
onkeypress
onkeydown
onkeyup
ACCESSKEY
Description of the accesskey attribute
ALLCAPS
Use the allcaps attribute to set the caps mode for the on-screen keyboard so
that text the viewer types defaults to capital letters.
AUTOACTIVATE
Use the autoactivate attribute to activate the text area automatically when the
viewer selects it. The WebTV interface draws the cursor in the activated text
area.
When the autoactivate attribute is not specified for a text area, the viewer
must press the GO button on the remote control (or Return on a keyboard) to
activate the text area for typing. Also, when autoactivate is not specified,
the arrow buttons on the remote control move the Highlight rectangle to the
next selectable item on the Web page.
When the autoactivate attribute is specified for a text area or when the viewer
has activated the area, the viewer can type in the text area and use the arrows
to move the text cursor within the area.
AUTOCAPS
Use the autocaps attribute so that the first letter of each word that the
viewer types with the on-screen keyboard is a capital letter. You can use the
autocaps attribute on text areas used for proper names and addresses.
BGCOLOR
Use the bgcolor attribute to set the background color for the text area. The
WebTV HTML interface accepts color values in either #rrggbb or color name
format. The default value for bgcolor is #eaeaea.
See the page Using colors for a description on
specifying colors.
COLS
Set the number of columns the text window will occupy on the screen.
CURSOR
Use the cursor attribute to set the color for the cursor in the text area. The
WebTV HTML interface accepts color values in either #rrggbb or color name
format. The default value for the cursor is dark blue (#3333aa), though many
pages override this value with yellow.
See the page Using colors for a description on
specifying colors.
DISABLED
This attribute makes the text field non-functional, so that the user can't
enter text in it.
The differences between disabled fields and readonly fields
function |
Readonly fields |
Disabled fields |
Getting focus |
can receive focus |
cannot receive focus |
Tabbing order |
included in the tabbing order |
skipped from the tabbing order |
Successful controls |
can be successful |
cannot be successful |
GROWABLE
Use the growable attribute to allow the text area to expand vertically as the
viewer types beyond its original boundary.
NAME
The name of the element inside the form. The name is sent to the server to
identify the field.
NOHARDBREAKS
Use the nohardbreaks attribute to prevent the viewer from entering hard breaks
in the text area. When the viewer does type a Return, the selection simply
moves to the next field.
NOSOFTBREAKS
Use the nosoftbreaks attribute to prevent the WebTV interface from sending soft
breaks when the form is submitted. Soft breaks are inserted in the text for
linewrapping in text areas.
NUMBERS
Use the numbers attribute so that when the WebTV interface displays the
on-screen keyboard, the ‘1’ key is selected. This reduces the time the viewer
spends to move the Highlight rectangle to the numeric keypad of the on-screen
keyboard.
ONBLUR
Defines JavaScript code to execute when the textarea element loses focus.
ONCHANGE
Defines JavaScript code to execute when the textarea element loses focus and
its value is changed.
ONFOCUS
Defines JavaScript code to execute when the user selects the textarea element
or tabs to it.
ONSELECT
Defines JavaScript code to execute when the user selects some of the text in
the textarea element.
READONLY
This makes it impossible for the user to change the value of the field.
The differences between disabled fields and readonly fields
function |
Readonly fields |
Disabled fields |
Getting focus |
can receive focus |
cannot receive focus |
Tabbing order |
included in the tabbing order |
skipped from the tabbing order |
Successful controls |
can be successful |
cannot be successful |
ROWS
Set the number of rows the text window will show on the screen.
SHOWKEYBOARD
Use the showkeyboard attribute to show the keyboard automatically when the
viewer selects the text area.
TABINDEX
Description of the TABINDEX attribute
USESTYLE
Use the usestyle attribute so that the text in the text area is rendered in the
current style in effect for the page.
WRAP
Determines how text will wrap onscreen and how the data is send to the server.
Value |
Description |
OFF |
Wrapping doesn't happen. Lines are sent exactly as typed.
|
HARD |
The display word-wraps, and the text is transmitted at all wrap points.
|
PHYSICAL |
The display word-wraps, and the text is transmitted at all wrap points.
|
SOFT |
The display word-wraps, but long lines are sent as one line without
new-lines.
|
VIRTUAL |
The display word-wraps, but long lines are sent as one line without
new-lines.
|
The default setting is OFF.
 |
<FORM>
<TABLE>
<TR>
<TD>Article number</TD>
<TD><INPUT type="text"></TD>
</TR>
<TR>
<TD valign="top">Description</TD>
<TD><TEXTAREA cols="40" rows="10">
Enter the description here</TEXTAREA></TD>
</TR>
</TABLE>
</FORM>
|
|
 |
|