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


JAVASCRIPT DHTML TUTORIALS » Node Operation » replaceData »

 

'replaceData()' Example



    
<html>
<body>
<script language="JavaScript">
function function1() {
    var m = document.getElementById("myP").firstChild;
    var myText = " (The replacement text) ";
    m.replaceData(129, myText)

</script>
<p id="myP">This is the reference text node.</p>
<input type = "button" value = 'Replace the word "reference"' 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
» replaceData