Jump to content

[SOLVED] Putting the "cursor" at the beginning of the textarea on page load


john010117

Recommended Posts

First of all, I don't know what the thing is called that blinks inside a textarea. So if you could tell me what the name of that is, that'll be great. I'll called it a cursor for now.

 

Here's the problem. Let's say I had a simple textarea with some values already filled in.

 

Ex:

Code:

<textarea name="input1" rows="15" cols="75">
<!-- Cursor should go here -->
----- Original Message -----
From: blah
To: Blah
Date: Blah

Blah Some Random Text
</textarea>

 

So, whenever a page loads, I need the "cursor" to be automatically at the beginning of the textarea (where "<!-- Cursor should go here -->" is). How would I go about doing that either in just HTML or Javascript?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.