JavaScript Reference/Javascript Methods/inRange — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:22, 26 мая 2010
"inRange()" Example
<source lang="javascript">
<html> <body> <script language="JavaScript"> function function1() {
var myText = document.body.createTextRange(); var myText2 = document.all.myText.createTextRange(); alert(myText.inRange(myText2));
} </script> <textarea id="myText" style="width:600; height:100;">Sample textarea text</textarea> <button onclick="function1();">InRange</button> </body> </html>
</source>
"inRange()" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |TextRange | +----------------+--------------------------------------------------------------+
</source>
"inRange()" Syntax, Parameters and Note
<source lang="javascript">
Note: Is the specified range inside another range. Returns true or false.
Syntax:
textRangeName.inRange(param1) Parameters:
param1 Required; the text range that may or may not be contained within textRangeName. </source>