JavaScript DHTML/Node Operation/createControlRange

Материал из Web эксперт
Перейти к: навигация, поиск

"createControlRange()" Example

   <source lang="html4strict">
   

<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>