JavaScript Reference/Javascript Methods/createControlRange

Материал из Web эксперт
Версия от 11:22, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"createControlRange()" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript"> function function1() {

   var myControlR = document.body.createControlRange();
   myControlR.add(myT);
   var m = myControlR.length;
   alert("There are "+ m +" elements in the controlRange collection")

} </script> <input id="myT" type="button" value="Click me" onclick="function1();"> </body> </html>


     </source>
   
  


"createControlRange()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<body> | +----------------+--------------------------------------------------------------+

     </source>
   
  


"createControlRange()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Creates a controlRange collection.

Syntax:

document.body.createControlRange()


     </source>