JavaScript DHTML/Node Operation/createTextRange

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

"createTextRange()" Example

   <source lang="html4strict">
   

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

   var myNode = document.body.createTextRange();
   myNode.text = "This is the new text"; 

} </script> <button onclick="function1();">Create text range</button> </body> </html>


     </source>