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.

10th Aug 2017, 3:43 PM
Š˜Š»ŃŒŃ Š±Š°Š“Š°Š½ŠøŠ½
Š˜Š»ŃŒŃ Š±Š°Š“Š°Š½ŠøŠ½ - avatar
1 Answer
0
Š•ŃŠ»Šø ŠæрŠ°Š²ŠøŠ»ŃŒŠ½Š¾ ŠæŠ¾Š½ŃŠ» тŠ¾ этŠ¾ ŠŗŠ°Šŗ тŠ¾ Š²Ń€Š¾Š“Šµ тŠ°Šŗ: paragraph.innerHTML = ''; paragraph.append(word);
7th Oct 2017, 2:25 PM
Siroj Samadov
Siroj Samadov - avatar