Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Your Email:

Things To Do With Textarea Form Fields

By Will Bontrager
2005-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


 | Bookmark
Related Tutorials:
» JavaScript Debugging Techniques with Firebug
» Striped Tables Using JavaScript
» Opening PDFs in a New Window with JavaScript
» Essential Javascript -- A Javascript Tutorial
» Submit Forms Conditionally using JavaScript
» How to Setup a Randomising Function