Jump to content

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


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.




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

Blah Some Random Text


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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.