Some operation summary of cursor

xiaoxiao2021-03-06  35

Some operation summary of cursor

The RANGE operation under IE is much better than mozilla, and only the operations under IE are discussed here.

Here is the characteristics of several cursor positioning:

1. The cursor does not change

Direct Obj.focus (), the cursor will return the previous position, that is, the location is constant

2. Cursor in the forefront

Var r = obj.createtextExTRANGE ();

r.collapse ();

R.select ();

Use this method to make the cursor in the Input box

3. Cursor in the final

Var r = obj.createtextExTRANGE ();

R.Collapse (false);

R.select ();

With this method, you can stop the cursor at the end of the input box.

4. Select some of the contents of the INPUT box requires the range of the MoveStart or Movend method, which uses the detailed method to use the MSDN.