0
How to replace string to node
I want to replace string to node. paragraph = document.getElementById('paragraph ') word = document.getElementById('word') val = paragraph.childNodes[0].nodeValue paragraph.innerHTML = val.replace(/text\s/, word) something like this.
1 Answer
0
ŠŃŠ»Šø ŠæŃŠ°Š²ŠøŠ»ŃŠ½Š¾ ŠæŠ¾Š½ŃŠ» ŃŠ¾ ŃŃŠ¾ ŠŗŠ°Šŗ ŃŠ¾ Š²ŃŠ¾Š“Šµ ŃŠ°Šŗ:
paragraph.innerHTML = '';
paragraph.append(word);