'createTextRange()' Example : createTextRange : Node Operation JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Node Operation » createTextRange »

 

'createTextRange()' Example



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

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Node Operation
» createTextRange