Things To Do With Textarea Form Fields
By Will Bontrager2005-09-26
Specifying Text Style, Wrap Characteristics, and Read Only
We also use attributes to specify the text style, turn wrap off, and to make the content read only. Here is an example copied from the "Removing Non-Digit Characters" blog entry:
<form>
<textarea
cols="44"
rows="2"
onclick="javascript:select()"
style="font-family: monospace; font-size: 12px;"
wrap="off"
readonly="yes">
$value =~ s/\D//g;
</textarea>
</form>
(The wrap="off" attribute can be important when presenting programming code. Some code, such as JavaScript, is line break sensitive.)
Tutorial Pages:
» Things To Do With Textarea Form Fields
» Automatically Selecting Content
» Specifying Text Style, Wrap Characteristics, and Read Only
» Bold Text and Text/Background Colors
» Textarea Field With Background Image
Copyright 2004 Bontrager Connection, LLC
