HBCMS更多的中文手册参考:

moveToPoint Method

DHTML文档教程

Moves the start and end positions of the text range to the given point.

dhtml语法

TextRange.moveToPoint(iX, iY)

Parameters

iX Required. Integerthat specifies the horizontal offset relative to the upper-left corner of the window, in pixels.
iY Required. Integerthat specifies the vertical offset relative to the upper-left corner of the window, in pixels.

Return Value

No return value.

Remarks

The coordinates of the point must be in pixels and be relative to the upper-left corner of the window. The resulting text range is empty, but you can expand and move the range using methods such as expand and moveend.

this feature might not be available on non-microsoft® win32® platforms.

DHTML代码范例

This example uses the moveToPoint method to move the text range to the point where the user clicked the mouse, expands the range, and selects the text within the new range.

<SCRIPT FOR=document EVENT=onclick LANGUAGE="JScript">
var rng = document.body.createTextRange();
rng.moveToPoint(window.event.x, window.event.y);
rng.expand("word");
rng.select();
</SCRIPT>

是否符合公共标准

There is no public standard that applies to this method.

Applies To

TextRange