CoderZone.org

Category: >> JavaScript >> Put Cursor At Top Of Textarea Bookmark and Share

<< lastnext >>

Snippet Name: Put Cursor At Top Of Textarea

Description: Puts the cursor at the top of a textarea (rather than at the bottom).

Comment: (none)

Author: CoderZone
Language: JAVASCRIPT
Highlight Mode: JAVASCRIPT
Last Modified: February 28th, 2009

 
// position cursor at top of textarea
function selTA() { 
document.send.body_text.focus(); 
document.send.body_text.selectionStart=0; 
document.send.body_text.selectionEnd=0; 
} 
 
window.onload = selTA;
 
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 7