Textarea rows attribute

Definition and Usage

rows Attribute sets or returns the value of the text area's rows attribute.

The HTML rows attribute specifies the height (number of visible lines) of the text area.

Tip:You can also use style.height Attribute to set the height of the text area.

Tip:Use cols Attribute or style.width Attribute to change the width of the text area.

See also:

HTML Reference Manual:HTML <textarea> rows এটা অপেরিটি

Example

Example 1

Change the number of visible lines in the text area:

document.getElementById("myTextarea").rows = "10";

Try it yourself

Example 2

Get the height of the text area, in characters:

var x = document.getElementById("myTextarea").rows;

Try it yourself

Example 3

Use style.height attribute to change the height of the text area:

document.getElementById("myTextarea").style.height = "250px";

Try it yourself

Example 4

Use cols and rows attributes to change the height and width of the text area:

document.getElementById("myTextarea").rows = "10";
document.getElementById("myTextarea").cols = "100";

Try it yourself

Example 5

Use style.width and style.height attributes to change the height and width of the text area:

document.getElementById("myTextarea").style.height = "100px";
document.getElementById("myTextarea").style.width = "500px";

Try it yourself

Syntax

Return rows attribute:

textareaObject.rows

set rows attribute:

textareaObject.rows = number

এটা প্রতিভূতি

মূল্য বর্ণনা
number টেক্সট এরিয়াতে দৃশ্যমান লাইনগুলি নির্দেশ করে

কারিগরি বিবরণ

ফলাফল: সংখ্যা, টেক্সট এর উচ্চতা নির্দেশ করে, অক্ষর হিসাবে।

ব্রাউজার সমর্থন

চ্রোম এডজ ফায়ারফক্স স্যাফারি অপেরা
চ্রোম এডজ ফায়ারফক্স স্যাফারি অপেরা
সমর্থন সমর্থন সমর্থন সমর্থন সমর্থন