How to Create Text Area

March 11, 2011 | 14:38

Text Area is the area where to store the text or posts to form a new area. Usually the text area used to store the HTML code or any other text that allows visitors to copy the entire contents of a text, well that is to say with a text area.

1. Usual text area

To create a text area, please copy the code below:

<p align="center"><textarea name="code" rows="2" cols="20"> Write text or HTML code you want here, then the text will appear here </textarea></p>

then the result:


Description:

for rows ="2" is the height of the text area, if you want the text area higher please replace the number "2" with a higher rate.
for cols ="20" is the width of the text area, if you want the text area wider please replace the number "40" with a higher rate.

2. Highlight the text area using

Another variation of the text area by using the button highlights. This highlights the key functions to make it easy for visitors to copy the entire text or code that is given only by pressing the button highlights. so when the button is pressed or clicked highlight the entire contents of a text or code in it will be on highlights and live in the copy alone. The function of this button is very useful to reduce the risk tertinggalnya text or code that will be copied if the text or code that is given Dalan number of very much.

To create a text area by using the highlight, copy the HTML code below:

<div><form name="copy"><div align="center"><span><input onclick="javascript:this.form.txt.focus();this.form.txt.select();" value="Highlight All" type="button"> </span></div><p align="center"><textarea style="width: 180px; height: 50px;" name="txt" rows="2" wrap="VIRTUAL" cols="40"> Write text or code you want here, then the written text or code will appear here and ready to be copied by the visitors </textarea></p></form></div>

result like this:


Description of the codes above the text area:

1. <div align="center"> -> words left shows that the position of the button will be on the center, so if you want to position the button in the left, just replace the word left. And if you want to be on the right, just replace the word right.
2. <input onclick="javascript:this.form.txt.focus();this.form.txt.selec()"> -> This code means that when the highlight button is clicked, then the entire text is in it will be in highligt (the mark or in block), do not alter this paper.
3. Value = "Highlight All" -> Highlight All words are words that will appear in the button, so if you want to change this text please replace with the desired word.
4. <p align="center"> -> This shows that the text area will be in the middle, well if you want the text area at the left edge, replace the word center with left, if you want at the right edge, replace the word right.
5. <text style="WIDTH: 180px"> -> the word "WIDTH: 180px" shows the width of the text area of 180 pixels, if you want to shorten or extend the width of the text area, just replace it with the desired number.
6. HEIGHT: 50px -> number "50px" indicates that the text area will have a height of 50px, if you want to change lives change that number by the desired number.

Hopefully helpful.
Share this article :
 
Copyright © 2010-2012. PAPATITI ONLINE . All Rights Reserved.
Template modify by Creating Website