最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

inRange Method

Internet Development Index

Returns a value indicating whether one range is contained within another.

Syntax

bFound = TextRange.inRange(oRange)

Parameters

oRange Required. TextRange object that might be contained.

Return Value

Boolean that returns one of the following possible values.

trueoRange is contained within or is equal to the TextRange object on which the method is called.
falseoRange is not contained within the TextRange object on which the method is called.

Remarks

This feature might not be available on platforms other than Microsoft® Win32®.

Examples

The following example shows how to use the inRange method to show that two TextRange objects are equal.

<HTML>
<SCRIPT>
window.onload=fnCheck;
function fnCheck(){
var oRng1 = document.body.createTextRange();
var oRng2 = oRng1.duplicate();
var bInside = oRng1.inRange(oRng2); // returns true;
}
</SCRIPT>
<BODY>
<DIV ID=div1>
Content for division 1.
</DIV>
<DIV ID=div2>
Content for division 2.
</DIV>
</BODY>
</HTML>

The following example shows how to use the inRange method to show that two contained ranges are not equal.

<HTML>
<SCRIPT>
window.onload=fnCheck;
function fnCheck(){
var oRng1.moveToElementText(div1);
var oRng2.moveToElementText(div2);
var bInside = oRng1.inRange(oRng2); // returns false;
}
</SCRIPT>
<BODY>
<DIV ID=div1>
Content for division 1.
</DIV>
<DIV ID=div2>
Content for division 2.
</DIV>
</BODY>
</HTML>

The following example shows how to use the inRange method to show that a text range exists within another text range.

<HTML>
<SCRIPT>
window.onload=fnCheck;
function fnCheck(){
var oRng1 = document.body.createTextRange();
var oRng3 = oRng1.duplicate();
oRng3.findText('division 1');
var bInside = oRng1.inRange(oRng3); // returns true;
}
</SCRIPT>
<BODY>
<DIV ID=div1>
Content for division 1.
</DIV>
<DIV ID=div2>
Content for division 2.
</DIV>
</BODY>
</HTML>
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this method.

Applies To

TextRange

See Also

isEqual
定日县| 临清市| 印江| 肃南| 黔江区| 葫芦岛市| 六安市| 凤冈县| 吴堡县| 广平县| 泽州县| 岐山县| 富顺县| 金乡县| 新田县| 克山县| 河西区| 清丰县| 香河县| 泗水县| 隆昌县| 榕江县| 余庆县| 资溪县| 邢台市| 清水河县| 山阳县| 安徽省| 墨脱县| 天全县| 洛川县| 建阳市| 合肥市| 通化县| 胶州市| 温宿县| 丘北县| 班玛县| 灌云县| 新乡市| 兴安盟|