After the object obtains the focus, it automatically moves the cursor to the end of the content and can be implemented using the focus () function. The following is a good example. If you are interested, refer
The Code is as follows:
SetFocus = function (id ){
Var t = $ ("#" + id). val ();
$ ("#" + Id). val (""). focus (). val (t );
}
Move the focus cursor to the end of the text of the id.
After jquery obtains the focus, the cursor is placed in the string. After the input obtains the focus, it automatically moves the cursor to the end of the text content. jQuery uses focus () method that enables the text input box to focus on the rightmost text
The Code is as follows:
// After obtaining the focus, the cursor is placed behind the string
// The principle is to copy and paste yourself after getting the focus
Var t = $ ("#" + id). val ();
$ ("#" + Id). val (""). focus (). val (t );