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


JAVASCRIPT DHTML TUTORIALS » Node Operation » pasteHTML »

 

'pasteHTML()' Example



    
<html>
<body>
<script language="JavaScript">
function function1() {
    var myRange = document.selection.createRange();
    var m = myRange.pasteHTML('<p>Hello World</p>'); 

</script>
<p>Highlight a part of this text, then click button below</p>
<input id="myB" type="button" value="Click me" onclick="function1();">
</body>
</html>

    
      
      



-

Leave a Comment / Note


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

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Node Operation
» pasteHTML