How to manipulate particular character in DOM in JavaScript?

Angel_Kirsch

New Member
Suppose I have text called "Hello World" inside a DIV in html file. I want to manipulate sixth position in "Hello World" text and replace that result in DOM, like using innerHTML or something like that.The way i do is \[code\]var text = document.getElementById("divID").innerText;\[/code\]now somehow I got the text and and manipluate the result using charAt for particular position and replace the result in html by replacing the whole string not just that position element. What I want to ask is do we have to every time replace the whole string or is there a way using which we can extract the character from particular position and replace the result in that position only not the whole string or text inside the div.
 
Top