Javascript Reference
Categories: InputTypeText

javascript InputTypeText select( )

@March 15, 2008, 1:22 a.m.
select( )Firefox/Netscape/NN 2 IE 3 Chrome/Safari/DOM 1  


Selects all the text displayed in the form element. You should invoke the focus( ) method on the element prior to the select( ) method. Moreover, to ease potential timing problems in IE for Windows, place the focus( ) and select( ) method statements in a separate function, and invoke that function through setTimeout( ), usually with a delay of 0 to 50 milliseconds. This lets the browser catch up with window refreshing tasks before selecting the contents.



Returned Value


Powered by Linode.