|
|
How to set the cursor to the end of a input box?
My function is going to set some predefined value to a input text box,
and it will focus to the inputbox and set it to the end of the value.
As the title, how to set the cursor to the end of value?
Thanks a lot!
|
|
0
|
|
|
|
Reply
|
cylix2000 (67)
|
7/9/2007 7:03:13 AM |
|
On Jul 9, 1:03 am, Cylix <cylix2...@gmail.com> wrote:
> how to set the cursor to the end of value?
var i = inputElement // <<<
var len=i.value.length;
if(i.setSelectionRange)
i.setSelectionRange(len,len)
else if(i.createTextRange){
var r=i.createTextRange();
r.moveStart("character",len)
r.select()
}
i.focus()
|
|
0
|
|
|
|
Reply
|
scripts
|
7/9/2007 10:45:58 AM
|
|
|
1 Replies
313 Views
(page loaded in 0.044 seconds)
Similiar Articles: How to set the cursor to the end of a input box? - comp.lang ...My function is going to set some predefined value to a input text box, and it will focus to the inputbox and set it to the end of the value. As the t... how to move the cursor to the beginning of a text field - comp ...... am using the middle function to extract the text but the cursor is always at the end. I want the user input ... Thanks in advance, > > Peter Only in FM7: Script step: Set ... Set caret (cursor) position in iframe WYSIWYG? - comp.lang ...I'd even be happy to just set the caret to the very end of the input rather than the very ... Set caret (cursor) position in iframe WYSIWYG? - comp.lang ... Hi I have ... How to control the cursor positon of java program in console mode ...I am writing a small database that requires user input.However, whenever something is output to the screen, the cursor ... at the beginning of the output instead of the end of ... Focus/blinking cursor? - comp.lang.java.guihtml - IE specific - blinking cursor disappears in input of type ... So I have a input field of type text that has a default value (YYYY) and when it gains focus the YYYY ... GUI keyboard input when zoom in selected - comp.soft-sys.matlab ...How to set the cursor to the end of a input box? - comp.lang ..... moveStart("character",len) r.select() } i.focus() ... Matlab GUI: displaying a vector in an edit text ... How to show cursor coordinate values of an image on screen? - comp ...... text( px+5, py, num2str(i) ); set(text_handle,'Color',[1 1 1]) end ... an easy way that I can put a small box ... an image on screen? - comp ... windows mouse pointer ... How do I get a login screen when I move cursor to a certain place ...How do I set up my Mac, such that when I move my cursor to the far ... Moving the cursor or tapping a key will bring up a dialog box, where ... Keyboard Input and Command ... How can I change the color of my cursor? - comp.sys.mac.misc ...Sometimes I lose track of where my cursor ... How to set a hyplink in JTextPane ... highlight content, determine text input points and more. In Windows 7, the mouse cursor ... Matlab GUI: displaying a vector in an edit text box - comp.soft ...Once the user puts his vector in the edit text box, I ... ... input = [input 0]; x=x+1; end end set(hObject,'String',input); end ... How to set the cursor to the end of a input box? - comp.lang ...My function is going to set some predefined value to a input text box, and it will focus to the inputbox and set it to the end of the value. As the t... Javascript: How To Set Cursor to Textbox End - x2line - BlogsIn order to set cursor to end of textbox in HTML need ... In order to set up a cursor to the end of the text box there are 2 ... script> < /head> < body> < input type ... 7/23/2012 3:07:09 PM
|
|
|
|
|
|
|
|
|