Here is my HTML:
<html>
    <head></head>
    <body>
        <section>
            <div class="should_be_replaced">something</div>
        </section>
    </body>
</html>
Also I have a variable which is containing some HTML tags:
var str = "<b>title</b><p>sth <span>sss</span></p>";
Now I want to replace the content of variable above with div.should_be_replaced element. How can I do that?
This is expected result:
<html>
    <head></head>
    <body>
        <section>
            <b>title</b><p>sth <span>sss</span></p>
        </section>
    </body>
</html>
 
     
     
     
     
    