How to select the first line in textarea?

L

laziers

Hi,
Anyone how could I select the first line in the <textarea> after page
load?
I have done after clicking on the textarea, but this isn't good I must
have after load :(

bye
 
D

Doug Gunnoe

Hi,
Anyone how could I select the first line in the <textarea> after page
load?
I have done after clicking on the textarea, but this isn't good I must
have after load :(

bye

How did you do it by clicking?

Just do the same thing, except instead of onclick, do
onload="whatEverYouWerDoingBefore()"

But what will be in the textarea when the page loads?
 
T

Thomas 'PointedEars' Lahn

Doug said:
Anyone how could I select the first line in the <textarea> after page
load? I have done after clicking on the textarea, but this isn't good
I must have after load :(
[...]

How did you do it by clicking?

Just do the same thing, except instead of onclick, do
onload="whatEverYouWerDoingBefore()"

Probably the OP did not mean a selection programmed by *them*.
But what will be in the textarea when the page loads?

The element's text content or any string value that has been assigned
to the `value' property of the element object in the process. RTFM.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top